|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimpledb.SeqScan
public class SeqScan
SeqScan is an implementation of a sequential scan access method that reads each tuple of a table in no particular order (e.g., as they are laid out on disk).
Constructor Summary | |
---|---|
SeqScan(TransactionId tid,
int tableid,
java.lang.String tableAlias)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes the sequential scan. |
TupleDesc |
getTupleDesc()
Implementation of DbIterator.getTupleDesc method. |
boolean |
hasNext()
|
Tuple |
next()
Implementation of DbIterator.getNext method. |
void |
open()
Opens this sequential scan. |
void |
rewind()
Rewinds the sequential back to the first record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SeqScan(TransactionId tid, int tableid, java.lang.String tableAlias)
tid
- The transaction this scan is running as a part of.tableid
- the table to scan.tableAlias
- the alias of this table (needed by the parser);
the returned tupleDesc should have fields with name tableAlias.fieldName
(note: this class is not responsible for handling a case where tableAlias
or fieldName are null. It shouldn't crash if they are, but the resulting
name can be null.fieldName, tableAlias.null, or null.null).Method Detail |
---|
public void open() throws DbException, TransactionAbortedException
open
in interface DbIterator
DbException
- when there are problems opening/accessing the database.
TransactionAbortedException
public TupleDesc getTupleDesc()
getTupleDesc
in interface DbIterator
public boolean hasNext() throws TransactionAbortedException, DbException
hasNext
in interface DbIterator
TransactionAbortedException
DbException
public Tuple next() throws java.util.NoSuchElementException, TransactionAbortedException, DbException
next
in interface DbIterator
java.util.NoSuchElementException
TransactionAbortedException
DbException
public void close()
close
in interface DbIterator
public void rewind() throws DbException, java.util.NoSuchElementException, TransactionAbortedException
rewind
in interface DbIterator
DbException
- When rewind is unsupported.
java.util.NoSuchElementException
TransactionAbortedException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |