Package | Description |
---|---|
PrologDB |
Modifier and Type | Class and Description |
---|---|
class |
KeyedTable
currently unused Table implementation
|
Modifier and Type | Method and Description |
---|---|
Table |
Table.add(Tuple t)
adds tuple t to 'this' table; throws error the schema of the tuple does
not match the schema of the table to which it is being added Untested
precondition: that the schema of the tuple conforms to the schema of the
table
|
Table |
Table.copy(TableSchema tableSchema)
dup Table by copying each tuple and returning the copied Table.
|
Table |
Table.copyForSelfJoins(java.lang.String copyTableName)
this method copies a table t for use in self-joins; the original table t
is copied and renamed to copyTableName
|
Table |
Table.filter(java.util.function.Predicate<Tuple> p)
return a Table from a given Table that satisfies predicate p
|
Table |
DB.getTable(java.lang.String tableName)
returns the Table object for the table with name tableName;
null is returned if table does not exist
|
Table |
DB.getTableEH(java.lang.String tableName)
error handler of getTable(String); return the Table object for the table
with name tableName; Error is thrown if no such table exists.
|
static Table |
Table.join(Table innerTable,
java.lang.String innerJoinKey,
Table outerTable,
java.lang.String outerJoinKey)
this is a table constructor that takes the equijoin of innerTable on the
innerJoinKey (column name) with outerTable on the outerJoinKey (column
name).
|
Table |
Table.project(java.util.List<Column> cols)
project Table to a list of cols
|
Table |
Table.project(java.lang.String... colNames)
project Table to an array of column names.
|
Table |
Table.project(TableSchema superTableSchema)
projects a Table to the set of columns of a super table schema if given
superTableSchema does not match any tuple in the list an Error is thrown
|
static Table |
Table.readTable(java.lang.String tableFilePath)
reads and parses a prolog table from given string filename.
|
Table |
Table.sort(java.lang.String columnName)
sort 'this' Table on column with columnName
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Table> |
Table.getSubTables()
returns list of table + its subtables to search note: this method is
really executed once.
|
java.util.Collection<Table> |
DB.getTables()
returns a collection of tables that define this database
|
Modifier and Type | Method and Description |
---|---|
static Table |
Table.join(Table innerTable,
java.lang.String innerJoinKey,
Table outerTable,
java.lang.String outerJoinKey)
this is a table constructor that takes the equijoin of innerTable on the
innerJoinKey (column name) with outerTable on the outerJoinKey (column
name).
|
Tuple |
Tuple.joinFirst(java.lang.String thisJoinKey,
Table otherTable,
java.lang.String otherJoinKey)
returns the first tuple of otherTable that joins with 'this', where
"this".thisJoinkey == otherTable.otherJoinKey; returns null otherwise
|
Tuple |
Tuple.joinFirstEH(java.lang.String thisJoinKey,
Table otherTable,
java.lang.String otherJoinKey)
same as firstJoin, except an Error is thrown if no tuple of otherTable is
found.
|
Modifier and Type | Method and Description |
---|---|
<S> S |
Table.map(java.util.function.Function<Table,S> f)
transform a table to an object of type S
|
Constructor and Description |
---|
Tuple(Table table)
create an empty tuple for the given table
|