|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimpledb.query.TableScan
public class TableScan
The Scan class corresponding to a table. A table scan is just a wrapper for a RecordFile object; most methods just delegate to the corresponding RecordFile methods.
| Constructor Summary | |
|---|---|
TableScan(TableInfo ti,
Transaction tx)
Creates a new table scan, and opens its corresponding record file. |
|
| 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, as a Constant. |
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()
Moves the scan to the next record. |
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)
Sets the value of the specified field, as a Constant. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TableScan(TableInfo ti,
Transaction tx)
ti - the table's metadatatx - the calling transaction| Method Detail |
|---|
public void beforeFirst()
Scan
beforeFirst in interface Scanpublic boolean next()
Scan
next in interface Scanpublic void close()
Scan
close in interface Scanpublic Constant getVal(String fldname)
getVal in interface Scanfldname - the name of the field
Scan.getVal(java.lang.String)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)
setVal in interface UpdateScanfldname - the name of the fieldval - the new value, expressed as a ConstantUpdateScan.setVal(java.lang.String, simpledb.query.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 | |||||||||