MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / DbFileIterator

Interface DbFileIterator

src/java/simpledb/storage/DbFileIterator.java:11–43  ·  view source on GitHub ↗

DbFileIterator is the iterator interface that all SimpleDB Dbfile should implement.

Source from the content-addressed store, hash-verified

9 * implement.
10 */
11public interface DbFileIterator{
12 /**
13 * Opens the iterator
14 * @throws DbException when there are problems opening/accessing the database.
15 */
16 void open()
17 throws DbException, TransactionAbortedException;
18
19 /** @return true if there are more tuples available, false if no more tuples or iterator isn't open. */
20 boolean hasNext()
21 throws DbException, TransactionAbortedException;
22
23 /**
24 * Gets the next tuple from the operator (typically implementing by reading
25 * from a child operator or an access method).
26 *
27 * @return The next tuple in the iterator.
28 * @throws NoSuchElementException if there are no more tuples
29 */
30 Tuple next()
31 throws DbException, TransactionAbortedException, NoSuchElementException;
32
33 /**
34 * Resets the iterator to the start.
35 * @throws DbException When rewind is unsupported.
36 */
37 void rewind() throws DbException, TransactionAbortedException;
38
39 /**
40 * Closes the iterator.
41 */
42 void close();
43}

Callers 35

testIteratorBasicMethod · 0.95
testIteratorCloseMethod · 0.95
indexIteratorMethod · 0.95
testIteratorBasicMethod · 0.95
testIteratorCloseMethod · 0.95
setUpMethod · 0.95
deleteTupleMethod · 0.95
testIteratorBasicMethod · 0.95
testIteratorCloseMethod · 0.95
indexIteratorMethod · 0.95

Implementers 8

HeapFileIteratorsrc/java/simpledb/storage/HeapFile.jav
MockScantest/simpledb/TestUtil.java
TupleArrayIteratorsrc/java/simpledb/Parser.java
TupleIteratorsrc/java/simpledb/storage/TupleIterato
BTreeScansrc/java/simpledb/index/BTreeScan.java
AggregateItersrc/java/simpledb/execution/AggregateI
SeqScansrc/java/simpledb/execution/SeqScan.ja
AbstractDbFileIteratorsrc/java/simpledb/storage/AbstractDbFi

Calls

no outgoing calls

Tested by

no test coverage detected