|
||||||||||
| 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 predicate| Method Detail |
|---|
public void beforeFirst()
Scan
beforeFirst in interface Scanpublic boolean next()
next in interface ScanScan.next()public void close()
Scan
close in interface Scanpublic Constant getVal(String fldname)
Scan
getVal in interface Scanfldname - the name of the field
public int getInt(String fldname)
Scan
getInt in interface Scanfldname - the name of the field
public String getString(String fldname)
Scan
getString in interface Scanfldname - the name of the field
public boolean hasField(String fldname)
Scan
hasField in interface Scanfldname - the name of the field
public void setVal(String fldname,
Constant val)
UpdateScan
setVal in interface UpdateScanfldname - the name of the fieldval - the new value, expressed as a Constant
public void setInt(String fldname,
int val)
UpdateScan
setInt in interface UpdateScanfldname - the name of the fieldval - the new integer value
public void setString(String fldname,
String val)
UpdateScan
setString in interface UpdateScanfldname - the name of the fieldval - the new string valuepublic void delete()
UpdateScan
delete in interface UpdateScanpublic void insert()
UpdateScan
insert in interface UpdateScanpublic RID getRid()
UpdateScan
getRid in interface UpdateScanpublic void moveToRid(RID rid)
UpdateScan
moveToRid in interface UpdateScanrid - the RID of the desired record
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||