|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.query.SelectScan
public class SelectScan
The scan class corresponding to the select relational algebra operator. All methods except next delegate their work to the underlying scan.
Constructor Summary | |
---|---|
SelectScan(Scan s,
Predicate pred)
Creates a select scan having the specified underlying scan and predicate. |
Method Summary | |
---|---|
void |
beforeFirst()
Positions the scan before its first record. |
void |
close()
Closes the scan and its subscans, if any. |
void |
delete()
Deletes the current record from the scan. |
int |
getInt(String fldname)
Returns the value of the specified integer field in the current record. |
RID |
getRid()
Returns the RID of the current record. |
String |
getString(String fldname)
Returns the value of the specified string field in the current record. |
Constant |
getVal(String fldname)
Returns the value of the specified field in the current record. |
boolean |
hasField(String fldname)
Returns true if the scan has the specified field. |
void |
insert()
Inserts a new record somewhere in the scan. |
void |
moveToRid(RID rid)
Positions the scan so that the current record has the specified RID. |
boolean |
next()
Move to the next record satisfying the predicate. |
void |
setInt(String fldname,
int val)
Modifies the field value of the current record. |
void |
setString(String fldname,
String val)
Modifies the field value of the current record. |
void |
setVal(String fldname,
Constant val)
Modifies the field value of the current record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SelectScan(Scan s, Predicate pred)
s
- the scan of the underlying querypred
- the selection predicateMethod Detail |
---|
public void beforeFirst()
Scan
beforeFirst
in interface Scan
public boolean next()
next
in interface Scan
Scan.next()
public void close()
Scan
close
in interface Scan
public Constant getVal(String fldname)
Scan
getVal
in interface Scan
fldname
- the name of the field
public int getInt(String fldname)
Scan
getInt
in interface Scan
fldname
- the name of the field
public String getString(String fldname)
Scan
getString
in interface Scan
fldname
- the name of the field
public boolean hasField(String fldname)
Scan
hasField
in interface Scan
fldname
- the name of the field
public void setVal(String fldname, Constant val)
UpdateScan
setVal
in interface UpdateScan
fldname
- the name of the fieldval
- the new value, expressed as a Constantpublic void setInt(String fldname, int val)
UpdateScan
setInt
in interface UpdateScan
fldname
- the name of the fieldval
- the new integer valuepublic void setString(String fldname, String val)
UpdateScan
setString
in interface UpdateScan
fldname
- the name of the fieldval
- the new string valuepublic void delete()
UpdateScan
delete
in interface UpdateScan
public void insert()
UpdateScan
insert
in interface UpdateScan
public RID getRid()
UpdateScan
getRid
in interface UpdateScan
public void moveToRid(RID rid)
UpdateScan
moveToRid
in interface UpdateScan
rid
- the RID of the desired record
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |