Package | Description |
---|---|
PrologDB | |
PrologParser |
Modifier and Type | Field and Description |
---|---|
protected TableSchema |
Table.schema
each table points to its tablesSchema "schema"
|
Modifier and Type | Method and Description |
---|---|
TableSchema |
TableSchema.CopyForSelfJoins(java.lang.String newTableName)
copies table schema (this) for self-joins.
|
TableSchema |
TableSchema.crossProduct(TableSchema otherSchema)
form the cross product of 'this' schema with otherSchema; this is a
concatenation of the column lists and a manufactured table name
|
TableSchema |
Table.getSchema()
returns schema of table
|
TableSchema |
Tuple.getSchema()
returns TableSchema of 'this' tuple
|
TableSchema |
SubTableSchema.getSuper() |
TableSchema |
DB.getTableSchema(java.lang.String name)
returns the TableSchema of the table with given name; null if table is
not found
|
TableSchema |
DBSchema.getTableSchema(java.lang.String tableName)
return the TableSchema with name tableName
|
TableSchema |
DB.getTableSchemaEH(java.lang.String name)
returns the TableSchema of the table with given name; Error
is thrown otherwise
|
TableSchema |
DBSchema.getTableSchemaEH(java.lang.String tableName)
return the TableSchema with name tableName
|
static TableSchema |
TableSchema.readSchema(java.io.File schemafile)
reads prolog schema from File schemafile; errors are reported to out
read only .schema and database files
|
static TableSchema |
TableSchema.readSchema(java.lang.String schemafileName)
reads prolog schema from File schemafileName that contains a single table
declaration; ParseExceptions and Errors are thrown
read only .schema and database files
|
Modifier and Type | Method and Description |
---|---|
java.util.List<TableSchema> |
SubTableSchema.getSubTableSchemas() |
java.util.LinkedList<TableSchema> |
DBSchema.getTableSchemas()
return list of TableSchemas of this database schema
|
Modifier and Type | Method and Description |
---|---|
void |
DBSchema.addTableSchema(TableSchema tableschema)
add table schema tableschema to 'this' database schema
|
boolean |
SubTableSchema.contains(TableSchema s)
does this subtable schema include TableSchema s1 as subtable?
|
Table |
Table.copy(TableSchema tableSchema)
dup Table by copying each tuple and returning the copied Table.
|
Tuple |
Tuple.copy(TableSchema newSchema)
returns a (deep) copy of a tuple;
precondition: newSchema and tableSchema must have identically
defined sets of columns; the schemas may have different names
|
TupleList |
TupleList.copy(TableSchema tableSchema)
copy tuple list by copying each tuple on the list and returning the
copied list.
|
TableSchema |
TableSchema.crossProduct(TableSchema otherSchema)
form the cross product of 'this' schema with otherSchema; this is a
concatenation of the column lists and a manufactured table name
|
boolean |
TableSchema.equals(TableSchema otherSchema)
returns true if 'this' schema equals otherSchema, false otherwise
|
void |
TableSchema.equalsEH(TableSchema otherSchema)
asserts if 'this' schema == otherSchema If false, Error is thrown
|
SubTableSchema |
DB.getSubTableSchema(TableSchema ts)
returns subtable declaration for a given table schema ts;
if no such declaration exists, null is returned; this declaration
lists the subtables of the given table.
|
SubTableSchema |
DBSchema.getSubTableSchema(TableSchema ts)
returns subtable object for given tableSchema ts, null if none exists
|
SubTableSchema |
DBSchema.getSubTableSchemaEH(TableSchema ts)
returns subtable object for given tableSchema ts; throws Error
if no such ts exists
|
static Tuple |
Tuple.parseTupleDecl(java.lang.String line,
int lineno,
TableSchema ts)
parses a line at lineno, expecting to parse a legal prolog tuple
declaration that conforms to table schema ts
|
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
|
Tuple |
Tuple.project(TableSchema superTableSchema)
projects 'this' tuple to the set of columns of a super table schema; if
table schemas do not match, tuple.getName() throws an Error projection
retains the first set of columns -- columns that are removed are at the
end of a tuple
|
Constructor and Description |
---|
DBSchema(java.lang.String name,
TableSchema... schemas)
create DBSchema that has name and a list of TableSchemas can
incrementally add subtable tableSchemas subsequently -- before schema is
instantiated as a database
|
KeyedTable(TableSchema tableSchema,
java.lang.String keyName)
returns KeyTable object that is a table of tableSchema instances
using a column whose name is keyName as the key column; Error
is thrown if no such column exists
|
SubTableSchema(TableSchema supr)
create new SubTable object for parent schema supr
|
SubTableSchema(TableSchema supr,
java.util.List<TableSchema> subs)
create subTableSchema declaration for parent TableSchema supr with
subtable Schemas subs
|
Table(TableSchema schema)
create an empty table for TableSchema schema
|
Tuple(TableSchema schema)
create an empty tuple for the given schema
|
Constructor and Description |
---|
SubTableSchema(TableSchema supr,
java.util.List<TableSchema> subs)
create subTableSchema declaration for parent TableSchema supr with
subtable Schemas subs
|
Modifier and Type | Method and Description |
---|---|
static TableSchema |
Parser.parseTableDecl(java.lang.String line,
int lineno)
a table declaration is on a single line.
|