Uses of Interface
edu.caltech.nanodb.relations.Tuple
-
Packages that use Tuple Package Description edu.caltech.nanodb.commands This package contains the classes that represent the commands that the NanoSQL database recognizes.edu.caltech.nanodb.expressions This package contains classes for representing and evaluating arithmetic and logical expressions.edu.caltech.nanodb.functions This package contains the abstractions for supporting simple functions, aggregate functions, and table-returning functions in NanoDB.edu.caltech.nanodb.indexes edu.caltech.nanodb.plannodes This package contains classes for representing query execution plans, as well as analyzing their costs.edu.caltech.nanodb.queryeval This package contains the query-evaluation components of the database.edu.caltech.nanodb.relations This package contains the basic data-types for representing relations in NanoDB.edu.caltech.nanodb.server edu.caltech.nanodb.storage This package contains the classes for the Storage Manager, which is responsible for how data is stored in and retrieved from database files.edu.caltech.nanodb.storage.heapfile This package provides a naive implementation of the heap file organization for NanoDB. -
-
Uses of Tuple in edu.caltech.nanodb.commands
Methods in edu.caltech.nanodb.commands with parameters of type Tuple Modifier and Type Method Description void
DeleteCommand.TupleRemover. process(Tuple tuple)
This implementation simply deletes each tuple it is handed.void
DumpCommand.TupleExporter. process(Tuple tuple)
This implementation simply prints out each tuple it is handed.void
InsertCommand.TupleInserter. process(Tuple tuple)
This implementation simply inserts each tuple it is handed.void
UpdateCommand.TupleUpdater. process(Tuple tuple)
This implementation updates each tuple it is handed, based on the set of update-specs that were given in the constructor. -
Uses of Tuple in edu.caltech.nanodb.expressions
Classes in edu.caltech.nanodb.expressions that implement Tuple Modifier and Type Class Description class
TupleLiteral
A simple implementation of theTuple
interface for storing literal tuple values.Fields in edu.caltech.nanodb.expressions with type parameters of type Tuple Modifier and Type Field Description private java.util.ArrayList<Tuple>
Environment. currentTuples
A mapping of string table names, to the current tuple for each of those tables.Methods in edu.caltech.nanodb.expressions that return types with arguments of type Tuple Modifier and Type Method Description java.util.ArrayList<Tuple>
Environment. getCurrentTuples()
Returns the ArrayList of tuples being considered.Methods in edu.caltech.nanodb.expressions with parameters of type Tuple Modifier and Type Method Description private static int
TupleComparator. _compareTuples(Tuple t1, Tuple t2, boolean allowSizeMismatch)
This is the private helper function that implements both theTupleComparator.compareTuples(edu.caltech.nanodb.relations.Tuple, edu.caltech.nanodb.relations.Tuple)
method and theTupleComparator.comparePartialTuples(edu.caltech.nanodb.relations.Tuple, edu.caltech.nanodb.relations.Tuple)
method.void
Environment. addTuple(Schema schema, Tuple tuple)
Adds a tuple to the environment with the given schema.void
TupleLiteral. appendTuple(Tuple tuple)
Appends the specified tuple's contents to this tuple-literal object.static boolean
TupleComparator. areTuplesEqual(Tuple t1, Tuple t2)
This helper function returns true if two tuples have the same number of columns and the values compare as equal when coerced with theTypeConverter.coerceComparison(java.lang.Object, java.lang.Object)
method.static boolean
TupleComparator. areTuplesEqual(Tuple t1, Tuple t2, double epsilon)
This helper function returns true if two tuples have the same number of columns and the values compare as equal when coerced with theTypeConverter.coerceComparison(java.lang.Object, java.lang.Object)
method.int
TupleComparator. compare(Tuple a, Tuple b)
Performs the comparison of two tuples based on the configuration of this tuple-comparator object.static int
TupleComparator. comparePartialTuples(Tuple t1, Tuple t2)
Compares all columns of the two input tuples, in the order they appear within the tuples, and a value is returned to indicate the ordering.static int
TupleComparator. compareTuples(Tuple t1, Tuple t2)
Compares all columns of the two input tuples, in the order they appear within the tuples, and a value is returned to indicate the ordering.static TupleLiteral
TupleLiteral. fromTuple(Tuple tuple)
Constructs a new tuple-literal that is a copy of the specified tuple.static int
TupleHasher. hashTuple(Tuple tuple)
static int
TupleHasher. hashTuple(Tuple tuple, java.util.List<java.lang.Integer> colIndexes)
Collects tuple values according to colIndexes into an ArrayList and returns the hash of the list. -
Uses of Tuple in edu.caltech.nanodb.functions
Methods in edu.caltech.nanodb.functions that return Tuple Modifier and Type Method Description abstract Tuple
TableFunction. getNextTuple()
Gets the next tuple that fulfills the conditions for this plan node. -
Uses of Tuple in edu.caltech.nanodb.indexes
Methods in edu.caltech.nanodb.indexes with parameters of type Tuple Modifier and Type Method Description void
IndexUpdater. afterRowDeleted(TableInfo tblFileInfo, Tuple oldValues)
void
IndexUpdater. afterRowInserted(TableInfo tblFileInfo, Tuple newTuple)
void
IndexUpdater. afterRowUpdated(TableInfo tblFileInfo, Tuple oldValues, Tuple newTuple)
void
IndexUpdater. beforeRowDeleted(TableInfo tblFileInfo, Tuple oldTuple)
void
IndexUpdater. beforeRowInserted(TableInfo tblFileInfo, Tuple newValues)
void
IndexUpdater. beforeRowUpdated(TableInfo tblFileInfo, Tuple oldTuple, Tuple newValues)
static PageTuple
IndexUtils. findTupleInIndex(Tuple key, TupleFile idxTupleFile)
Given an index tuple-file and a search key, this method attempts to find the first tuple in the index that matches the search key.static TupleLiteral
IndexUtils. makeTableSearchKey(ColumnRefs columnRefs, Tuple tuple, boolean findExactTuple)
This helper function creates aTupleLiteral
that holds the key-values necessary for probing, storing or deleting a tuple in a table's index. -
Uses of Tuple in edu.caltech.nanodb.plannodes
Fields in edu.caltech.nanodb.plannodes declared as Tuple Modifier and Type Field Description private Tuple
ProjectNode. currentTuple
Current tuple the node is projecting (in NON-projected form).protected Tuple
SelectNode. currentTuple
The current tuple that the node is selecting.private Tuple
NestedLoopJoinNode. leftTuple
Most recently retrieved tuple of the left relation.private Tuple
SortMergeJoinNode. leftTuple
Most recently retrieved tuple of the left relation.private Tuple
NestedLoopJoinNode. rightTuple
Most recently retrieved tuple of the right relation.private Tuple
SortMergeJoinNode. rightTuple
Most recently retrieved tuple of the right relation.Fields in edu.caltech.nanodb.plannodes with type parameters of type Tuple Modifier and Type Field Description private java.util.ArrayList<Tuple>
SortNode. sortedResults
This array receives all tuples from the child plan node, and then they are sorted and passed along to the parent from this array.private java.util.ArrayList<Tuple>
TupleBagNode. tuples
The collection of tuples that are returned by this plan node.Methods in edu.caltech.nanodb.plannodes that return Tuple Modifier and Type Method Description Tuple
HashedGroupAggregateNode. getNextTuple()
Gets the next tuple that fulfills the conditions for this plan node.Tuple
NestedLoopJoinNode. getNextTuple()
Returns the next joined tuple that satisfies the join condition.abstract Tuple
PlanNode. getNextTuple()
Gets the next tuple that fulfills the conditions for this plan node.Tuple
ProjectNode. getNextTuple()
Gets the next tuple and projects it.Tuple
RenameNode. getNextTuple()
Tuple
SelectNode. getNextTuple()
Gets the next tuple selected by the predicate.Tuple
SortedGroupAggregateNode. getNextTuple()
Gets the next tuple that fulfills the conditions for this plan node.Tuple
SortMergeJoinNode. getNextTuple()
Tuple
SortNode. getNextTuple()
Gets the next tuple that fulfills the conditions for this plan node.Tuple
TableFunctionScanNode. getNextTuple()
Tuple
TupleBagNode. getNextTuple()
protected Tuple
ThetaJoinNode. joinTuples(Tuple left, Tuple right)
Combine the left tuple and the right tuple.private Tuple
ProjectNode. projectTuple(Tuple tuple)
This helper method takes an input tuple and projects it to a result tuple based on the projectMethods in edu.caltech.nanodb.plannodes with parameters of type Tuple Modifier and Type Method Description void
TupleBagNode. addTuple(Tuple tup)
Adds a tuple to the bag of tuples.protected boolean
SelectNode. isTupleSelected(Tuple tuple)
protected Tuple
ThetaJoinNode. joinTuples(Tuple left, Tuple right)
Combine the left tuple and the right tuple.private Tuple
ProjectNode. projectTuple(Tuple tuple)
This helper method takes an input tuple and projects it to a result tuple based on the project -
Uses of Tuple in edu.caltech.nanodb.queryeval
Methods in edu.caltech.nanodb.queryeval with parameters of type Tuple Modifier and Type Method Description void
PrettyTuplePrinter. process(Tuple tuple)
void
TuplePrinter. process(Tuple tuple)
void
TupleProcessor. process(Tuple tuple)
Processes a single tuple generated from evaluating a query plan. -
Uses of Tuple in edu.caltech.nanodb.relations
Methods in edu.caltech.nanodb.relations that return Tuple Modifier and Type Method Description static Tuple
TupleUtils. coerceToSchema(Tuple input, Schema schema)
static Tuple
TableUtils. findFirstTupleEquals(TupleFile tupleFile, java.util.Map<java.lang.Integer,java.lang.Object> values)
static Tuple
TableUtils. findNextTupleEquals(TupleFile tupleFile, Tuple prevTup, java.util.Map<java.lang.Integer,java.lang.Object> values)
Methods in edu.caltech.nanodb.relations with parameters of type Tuple Modifier and Type Method Description void
DatabaseConstraintEnforcer. afterRowDeleted(TableInfo tableInfo, Tuple oldTuple)
Perform processing after a row has been deleted from a table.void
DatabaseConstraintEnforcer. afterRowInserted(TableInfo tblFileInfo, Tuple newTuple)
Perform processing after a row is inserted into a table.void
DatabaseConstraintEnforcer. afterRowUpdated(TableInfo tableInfo, Tuple oldTuple, Tuple newTuple)
Perform processing after a row is updated in a table.private void
DatabaseConstraintEnforcer. applyOnDeleteEffects(TableInfo tableInfo, java.lang.String referencingTableName, Tuple oldTuple)
This function checks the ON DELETE option for each child table affected by the deletion of tup due to a foreign key, and then executes that option.private void
DatabaseConstraintEnforcer. applyOnUpdateEffects(TableInfo tableInfo, java.lang.String referencingTableName, Tuple oldTuple, Tuple newTuple)
This function performs ON UPDATE tasks for each referencing table that is potentially affected by the update of a tuple in the referenced table.void
DatabaseConstraintEnforcer. beforeRowDeleted(TableInfo tableInfo, Tuple oldTuple)
Perform processing after a row has been deleted from a table.void
DatabaseConstraintEnforcer. beforeRowInserted(TableInfo tableInfo, Tuple newTuple)
Perform processing before a row is inserted into a table.void
DatabaseConstraintEnforcer. beforeRowUpdated(TableInfo tableInfo, Tuple oldTuple, Tuple newTuple)
Perform processing before a row is updated in a table.private void
DatabaseConstraintEnforcer. checkNotNullConstraints(TableInfo tableInfo, Tuple tuple)
This helper function verifies that a tuple being added to a table satisfies all the NOT NULL constraints on the table.static Tuple
TupleUtils. coerceToSchema(Tuple input, Schema schema)
static Tuple
TableUtils. findNextTupleEquals(TupleFile tupleFile, Tuple prevTup, java.util.Map<java.lang.Integer,java.lang.Object> values)
private boolean
DatabaseConstraintEnforcer. hasCandidateKeyValue(TableInfo tableInfo, KeyColumnRefs candidateKey, Tuple tuple)
Checks to see if a particular candidate-key value already appears in a table.static boolean
TableUtils. hasEqualValues(Tuple tup, java.util.Map<java.lang.Integer,java.lang.Object> values)
private DeleteCommand
DatabaseConstraintEnforcer. makeDeleteCommand(TableInfo tableInfo, int[] schemaIndexes, Tuple oldTuple, int[] tupleIndexes)
private CompareOperator
DatabaseConstraintEnforcer. makeEqualityComparison(Schema schema, int iSchema, Tuple tuple, int iTuple)
private Expression
DatabaseConstraintEnforcer. makeEqualityPredicate(Schema schema, int[] schemaIndexes, Tuple tuple, int[] tupleIndexes)
private Expression
DatabaseConstraintEnforcer. makeExistsPredicate(TableInfo tableInfo, int[] schemaIndexes, Tuple tuple, int[] tupleIndexes)
private UpdateCommand
DatabaseConstraintEnforcer. makeUpdateCommand(TableInfo tableInfo, int[] schemaIndexes, Tuple oldTuple, Tuple newTuple, int[] tupleIndexes)
static java.util.Map<java.lang.Integer,java.lang.Object>
TableUtils. makeValueMap(int[] colIndexes, Tuple tup)
static java.util.Map<java.lang.Integer,java.lang.Object>
TableUtils. makeValueMap(int[] colIndexes, Tuple tup, int[] refColIndexes)
private boolean
DatabaseConstraintEnforcer. referencedTableHasValue(ForeignKeyColumnRefs foreignKey, Tuple tuple)
This helper function enforces a foreign key constraint by checking the referenced table to ensure that the tuple being added has values that appear in the referenced table. -
Uses of Tuple in edu.caltech.nanodb.server
Methods in edu.caltech.nanodb.server with parameters of type Tuple Modifier and Type Method Description void
RowEventListener. afterRowDeleted(TableInfo tblFileInfo, Tuple oldValues)
Perform processing after a row has been deleted from a table.void
RowEventListener. afterRowInserted(TableInfo tblFileInfo, Tuple newTuple)
Perform processing after a row is inserted into a table.void
RowEventListener. afterRowUpdated(TableInfo tblFileInfo, Tuple oldValues, Tuple newTuple)
Perform processing after a row is updated in a table.void
RowEventListener. beforeRowDeleted(TableInfo tblFileInfo, Tuple oldTuple)
Perform processing after a row has been deleted from a table.void
RowEventListener. beforeRowInserted(TableInfo tblFileInfo, Tuple newValues)
Perform processing before a row is inserted into a table.void
RowEventListener. beforeRowUpdated(TableInfo tblFileInfo, Tuple oldTuple, Tuple newValues)
Perform processing before a row is updated in a table.void
EventDispatcher. fireAfterRowDeleted(TableInfo tblFileInfo, Tuple oldValues)
void
EventDispatcher. fireAfterRowInserted(TableInfo tblFileInfo, Tuple newTuple)
void
EventDispatcher. fireAfterRowUpdated(TableInfo tblFileInfo, Tuple oldValues, Tuple newTuple)
void
EventDispatcher. fireBeforeRowDeleted(TableInfo tblFileInfo, Tuple oldTuple)
void
EventDispatcher. fireBeforeRowInserted(TableInfo tblFileInfo, Tuple newValues)
void
EventDispatcher. fireBeforeRowUpdated(TableInfo tblFileInfo, Tuple oldTuple, Tuple newValues)
void
CommandResult.ResultCollector. process(Tuple tuple)
void
TupleSender. process(Tuple tuple)
-
Uses of Tuple in edu.caltech.nanodb.storage
Classes in edu.caltech.nanodb.storage that implement Tuple Modifier and Type Class Description class
PageTuple
Methods in edu.caltech.nanodb.storage that return Tuple Modifier and Type Method Description Tuple
TupleFile. addTuple(Tuple tuple)
Adds the specified tuple into the table file, returning a new object corresponding to the actual tuple added to the table.Tuple
HashedTupleFile. findFirstTupleEquals(Tuple hashKey)
Returns the first tuple in the file that has the same hash-key values, ornull
if there are no tuples with this hash-key value in the tuple file.Tuple
SequentialTupleFile. 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
SequentialTupleFile. 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.Tuple
HashedTupleFile. findNextTupleEquals(Tuple prevTuple)
Returns the next entry in the index that has the same hash-key value, ornull
if there are no more entries with this hash-key value in the tuple file.Tuple
TupleFile. getFirstTuple()
Returns the first tuple in this table file, or null if there are no tuples in the file.Tuple
TupleFile. getNextTuple(Tuple tuple)
Returns the tuple that follows the specified tuple, ornull
if there are no more tuples in the file.Tuple
TupleFile. getTuple(FilePointer fptr)
Returns the tuple corresponding to the specified file pointer.Methods in edu.caltech.nanodb.storage with parameters of type Tuple Modifier and Type Method Description Tuple
TupleFile. addTuple(Tuple tuple)
Adds the specified tuple into the table file, returning a new object corresponding to the actual tuple added to the table.void
TupleFile. deleteTuple(Tuple tuple)
Deletes the specified tuple from the table.Tuple
HashedTupleFile. findFirstTupleEquals(Tuple hashKey)
Returns the first tuple in the file that has the same hash-key values, ornull
if there are no tuples with this hash-key value in the tuple file.Tuple
SequentialTupleFile. 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
SequentialTupleFile. 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.Tuple
HashedTupleFile. findNextTupleEquals(Tuple prevTuple)
Returns the next entry in the index that has the same hash-key value, ornull
if there are no more entries with this hash-key value in the tuple file.Tuple
TupleFile. getNextTuple(Tuple tuple)
Returns the tuple that follows the specified tuple, ornull
if there are no more tuples in the file.static int
PageTuple. getTupleStorageSize(Schema schema, Tuple tuple)
This helper function takes a tuple (from an arbitrary source) and computes how much space it would require to be stored in a heap table file with the specified schema.static int
PageTuple. storeTuple(DBPage dbPage, int pageOffset, Schema schema, Tuple tuple)
void
TupleFile. updateTuple(Tuple tuple, java.util.Map<java.lang.String,java.lang.Object> newValues)
Modifies the values in the specified tuple. -
Uses of Tuple in edu.caltech.nanodb.storage.heapfile
Classes in edu.caltech.nanodb.storage.heapfile that implement Tuple Modifier and Type Class Description class
HeapFilePageTuple
Methods in edu.caltech.nanodb.storage.heapfile that return Tuple Modifier and Type Method Description Tuple
HeapTupleFile. addTuple(Tuple tup)
Adds the specified tuple into the table file.Tuple
HeapTupleFile. getFirstTuple()
Returns the first tuple in this table file, or null if there are no tuples in the file.Tuple
HeapTupleFile. getNextTuple(Tuple tup)
Returns the tuple that follows the specified tuple, ornull
if there are no more tuples in the file.Tuple
HeapTupleFile. getTuple(FilePointer fptr)
Returns the tuple corresponding to the specified file pointer.Methods in edu.caltech.nanodb.storage.heapfile with parameters of type Tuple Modifier and Type Method Description Tuple
HeapTupleFile. addTuple(Tuple tup)
Adds the specified tuple into the table file.void
HeapTupleFile. deleteTuple(Tuple tup)
Tuple
HeapTupleFile. getNextTuple(Tuple tup)
Returns the tuple that follows the specified tuple, ornull
if there are no more tuples in the file.static HeapFilePageTuple
HeapFilePageTuple. storeNewTuple(Schema schema, DBPage dbPage, int slot, int pageOffset, Tuple tuple)
void
HeapTupleFile. updateTuple(Tuple tup, java.util.Map<java.lang.String,java.lang.Object> newValues)
-