Package | Description |
---|---|
PrologDB |
Modifier and Type | Method and Description |
---|---|
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
|
Tuple |
Table.getFirst(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
Tuple |
Table.getFirstEH(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
Tuple |
KeyedTable.getKey(java.lang.String keyValue)
returns the tuple with the given keyValue; null returned if no such
keyValue exists
|
Tuple |
KeyedTable.getKeyEH(java.lang.String keyValue)
Error Handling version of getKey; Error returned if no
such tuple exists
|
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.
|
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
|
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
|
Modifier and Type | Method and Description |
---|---|
java.util.stream.Stream<Tuple> |
Table.stream()
convert table into a stream of Tuples
|
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
|
void |
Unique.add(Tuple t)
register the content of a tuple: get its idcol key, column value,
and see if the column value has been seen before; if so, report an error.
|
Modifier and Type | Method and Description |
---|---|
Table |
Table.filter(java.util.function.Predicate<Tuple> p)
return a Table from a given Table that satisfies predicate p
|
Tuple |
Table.getFirst(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
Tuple |
Table.getFirstEH(java.util.function.Predicate<Tuple> p)
return first tuple in table that satisfies predicate p
|
<S> S |
Tuple.map(java.util.function.Function<Tuple,S> f)
transform a Tuple to an object of type S
|