Package edu.caltech.nanodb.storage
Interface SequentialTupleFile
-
- All Superinterfaces:
TupleFile
public interface SequentialTupleFile extends TupleFile
This interface extends theTupleFile
interface, adding operations that can be provided on files of tuples that are stored in a specific sequential order. TheTupleFile.getFirstTuple()
andTupleFile.getNextTuple(edu.caltech.nanodb.relations.Tuple)
methods have an additional constraint that they traverse the file's tuples in a specific order, as specified by thegetOrderSpec()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tuple
findFirstTupleEquals(Tuple searchKey)
Returns the first tuple in the file that has the same search-key value, ornull
if there are no tuples with this search-key value in the tuple file.Tuple
findFirstTupleGreaterThan(Tuple searchKey)
Returns the first tuple in the file that has a search-key value that is greater than the specified search-key value, ornull
if there are no tuples greater than this search-key value in the index.java.util.List<OrderByExpression>
getOrderSpec()
Returns the column(s) that are used to order the tuples in this sequential file.-
Methods inherited from interface edu.caltech.nanodb.storage.TupleFile
addTuple, analyze, deleteTuple, getDBFile, getFirstTuple, getManager, getNextTuple, getSchema, getStats, getTuple, optimize, updateTuple, verify
-
-
-
-
Method Detail
-
getOrderSpec
java.util.List<OrderByExpression> getOrderSpec()
Returns the column(s) that are used to order the tuples in this sequential file.- Returns:
- the column(s) that are used to order the tuples in this sequential file.
-
findFirstTupleEquals
Tuple findFirstTupleEquals(Tuple searchKey)
Returns the first tuple in the file that has the same search-key value, ornull
if there are no tuples with this search-key value in the tuple file. This operation is slightly unusual in that the search key may contain fewer columns than the sequential file does. When this is the case, the sequential file returns the first tuple that matches in the parts of the search key that are actually specified.- Parameters:
searchKey
- the tuple to search for- Returns:
- The first tuple in the file with the same hash-key values, or
null
if the file contains no files with the specified search key value. This tuple will actually be backed by the tuple file, so typically it will be a subclass ofPageTuple
.
-
findFirstTupleGreaterThan
Tuple findFirstTupleGreaterThan(Tuple searchKey)
Returns the first tuple in the file that has a search-key value that is greater than the specified search-key value, ornull
if there are no tuples greater than this search-key value in the index. This operation is slightly unusual in that the search key may contain fewer columns than the sequential file does. When this is the case, the sequential file returns the first tuple that is greater in the parts of the search key that are actually specified.- Parameters:
searchKey
-- Returns:
-
-