dsql.value
Class RangeValue

java.lang.Object
  extended bydsql.DMExecuted
      extended bydsql.value.Value
          extended bydsql.value.NonScalarValue
              extended bydsql.value.RangeValue
All Implemented Interfaces:
RecordHolder

public class RangeValue
extends NonScalarValue
implements RecordHolder

A range results, e.g. 1..10


Field Summary
 int count
           
 int direction
           
 int lower
           
 int upper
           
 
Constructor Summary
RangeValue(DSQL _caller, int _lower, int _upper)
           
 
Method Summary
 boolean getBoolean()
           
 ConstructedResults getMeta()
           
 Value getRecord(int i)
           
 int getRecordCount()
          this function should be called with care as it can be computationaly expensive for SQL Cursors!
 java.lang.String getString()
           
 void print(ASTPrint printer)
          Print this value using printer
 void setRecord(int i, Value val)
           
 
Methods inherited from class dsql.value.NonScalarValue
getField, getFields, isScalar, setField
 
Methods inherited from class dsql.value.Value
getFloat, getInt, getObject, getObjectClass, getRecordHolder, getType, getValue, getValue
 
Methods inherited from class dsql.DMExecuted
getCaller, setCaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lower

public int lower

upper

public int upper

direction

public int direction

count

public int count
Constructor Detail

RangeValue

public RangeValue(DSQL _caller,
                  int _lower,
                  int _upper)
Method Detail

getString

public java.lang.String getString()
Specified by:
getString in class Value
Returns:
a string representation of this value, to be used within dsql expressions. This is distinct from toString(), which is used to output the object for debugging purposes.

getBoolean

public boolean getBoolean()
Specified by:
getBoolean in class Value
Returns:
true if this Value is "non-zero", e.g. non-empty string, tables has some record, etc.

getMeta

public ConstructedResults getMeta()
                           throws ExecuteException
Specified by:
getMeta in class Value
Returns:
meta-information about this Value, e.g. for a table, it returns the names,types,width,etc. of its columns.
Throws:
ExecuteException

print

public void print(ASTPrint printer)
           throws ExecuteException
Description copied from class: Value
Print this value using printer

Specified by:
print in class Value
Throws:
ExecuteException

getRecordCount

public int getRecordCount()
Description copied from interface: RecordHolder
this function should be called with care as it can be computationaly expensive for SQL Cursors!

Specified by:
getRecordCount in interface RecordHolder
Returns:
number of records

getRecord

public Value getRecord(int i)
Specified by:
getRecord in interface RecordHolder
Returns:
record at position i (first record is 1). For SQL cursors, the returned Value can be a ProxyRecord

setRecord

public void setRecord(int i,
                      Value val)
               throws ExecuteException
Specified by:
setRecord in interface RecordHolder
Throws:
ExecuteException