List of all members.
Constructor & Destructor Documentation
Empty constructor. Should only be called from another constructor.
Builds a table from a character string. The string must follow these conventions:
-
Any leading or trailing whitespace on a line is ignored
-
Empty lines and lines starting with
#
or ---
are ignored
-
The first non-ignored line is a comma- or space-separated list of attribute names
-
The remaining non-ignored lines are comma- or space-separated list of attribute values, making a tuple
- Parameters:
-
Creates an empty table with given schema
- Parameters:
-
Member Function Documentation
Determines if a relation contains a given tuple. Contrarily to the generic implementation of contains, the method for instances of Table is efficient, as it simply calls the contains method of the underlying list of tuples. It does not present the side effects (reset of enumeration) that the generic method has.
- Parameters:
-
- Returns:
- True if the tuple is present, false otherwise
Reimplemented from ca.uqac.dim.ddb.Relation.
Copies the contents of a relation into the current relation. In particular, invoking copy with a query tree triggers the computation of that query and the storing of the resulting tuples into the current relation.
- Parameters:
-
r | The relation to copy from |
Computes the cardinality of a relation. Except for instances of Table (which actually contain concrete tuples), calling this method will trigger the evaluation of the query tree and the enumeration of all tuples. It should be used sparingly.
- Returns:
- The number of tuples in the relation
Reimplemented from ca.uqac.dim.ddb.Relation.
Gives the table's name
- Returns:
- The table's name
Method that must be implemented by every non-abstract relation; it returns the next tuple of the enumeration, if any. Methods next and hasNext use the return value of internalNext and additionally remove any duplicate tuples from the output enumeration. Hence a call to next may result in multiple calls to the relation's internalNext, if the tuples returned are already part of the result (this is especially true of Projections.
- Returns:
- The next tuple,
null
if no such tuple exists
Implements ca.uqac.dim.ddb.Relation.
Adds a new tuple to the table. It is assumed that the tuple's degree is equal to the schema's degree. An assertion fails otherwise (but no exception is raised).
- Parameters:
-
Resets the enumeration of tuples, i.e. starts back at the first tuple of the relation.
Reimplemented from ca.uqac.dim.ddb.Relation.
Set the table's name.
- Parameters:
-
Returns the number of actual tuples present in the query. This number is different from the cardinality of the query; it counts the number of tuples that are present in the leaves of the query tree.
- Returns:
- The tuple count
Implements ca.uqac.dim.ddb.Relation.
Member Data Documentation
The documentation for this class was generated from the following file: