public class Delete extends Operator
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
Delete(TransactionId t,
DbIterator child)
Constructor specifying the transaction that this delete belongs to as
well as the child to read from.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this iterator.
|
protected Tuple |
fetchNext()
Deletes tuples as they are read from the child operator.
|
DbIterator[] |
getChildren() |
TupleDesc |
getTupleDesc()
Returns the TupleDesc associated with this DbIterator.
|
void |
open()
Opens the iterator.
|
void |
rewind()
Resets the iterator to the start.
|
void |
setChildren(DbIterator[] children)
Set the children(child) of this operator.
|
getEstimatedCardinality, hasNext, next, setEstimatedCardinality
private static final long serialVersionUID
public Delete(TransactionId t, DbIterator child)
t
- The transaction this delete runs inchild
- The child operator from which to read tuples for deletionpublic TupleDesc getTupleDesc()
DbIterator
getTupleDesc
in interface DbIterator
getTupleDesc
in class Operator
public void open() throws DbException, TransactionAbortedException
DbIterator
open
in interface DbIterator
open
in class Operator
DbException
- when there are problems opening/accessing the database.TransactionAbortedException
public void close()
Operator
close
in interface DbIterator
close
in class Operator
public void rewind() throws DbException, TransactionAbortedException
DbIterator
DbException
- when rewind is unsupported.TransactionAbortedException
protected Tuple fetchNext() throws TransactionAbortedException, DbException
fetchNext
in class Operator
TransactionAbortedException
DbException
Database.getBufferPool()
,
BufferPool.deleteTuple(simpledb.TransactionId, simpledb.Tuple)
public DbIterator[] getChildren()
getChildren
in class Operator
public void setChildren(DbIterator[] children)
Operator
setChildren
in class Operator
children
- the DbIterators which are to be set as the children(child) of
this operator