simpledb.query
Interface UpdateScan

All Superinterfaces:
Scan
All Known Implementing Classes:
SelectScan, TableScan

public interface UpdateScan
extends Scan

The interface implemented by all updateable scans.

Author:
Edward Sciore

Method Summary
 void delete()
          Deletes the current record from the scan.
 RID getRid()
          Returns the RID of the current record.
 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.
 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 interface simpledb.query.Scan
beforeFirst, close, getInt, getString, getVal, hasField, next
 

Method Detail

setVal

void setVal(String fldname,
            Constant val)
Modifies the field value of the current record.

Parameters:
fldname - the name of the field
val - the new value, expressed as a Constant

setInt

void setInt(String fldname,
            int val)
Modifies the field value of the current record.

Parameters:
fldname - the name of the field
val - the new integer value

setString

void setString(String fldname,
               String val)
Modifies the field value of the current record.

Parameters:
fldname - the name of the field
val - the new string value

insert

void insert()
Inserts a new record somewhere in the scan.


delete

void delete()
Deletes the current record from the scan.


getRid

RID getRid()
Returns the RID of the current record.

Returns:
the RID of the current record

moveToRid

void moveToRid(RID rid)
Positions the scan so that the current record has the specified RID.

Parameters:
rid - the RID of the desired record


Copyright © 2011. All Rights Reserved.