public class RelationImpl extends Relation
DUMMY| Constructor and Description |
|---|
RelationImpl(ConnectedDB database,
AliasMap aliases,
Expression condition,
Expression softCondition,
Set<Join> joinConditions,
Set<ProjectionSpec> projections,
boolean isUnique,
List<OrderSpec> orderSpecs,
int limit,
int limitInverse) |
| Modifier and Type | Method and Description |
|---|---|
AliasMap |
aliases()
The tables that are used to set up this relation, both in
their aliased form, and with their original physical names.
|
Expression |
condition()
An expression that must be satisfied for all tuples in the
relation.
|
ConnectedDB |
database() |
boolean |
isUnique() |
Set<Join> |
joinConditions()
Returns the join conditions that must hold between the tables
in the relation.
|
int |
limit()
The limit clause for the SQL result set
|
int |
limitInverse()
The limit clause for the SQL result set describing the inverse relation
|
List<OrderSpec> |
orderSpecs()
The expressions (and ascending/descending flag) used for ordering
the relation.
|
Relation |
project(Set<? extends ProjectionSpec> projectionSpecs)
Applies the projection operator to this relation.
|
Set<ProjectionSpec> |
projections()
The attributes or expressions that the relation is projected to.
|
Relation |
renameColumns(ColumnRenamer renames)
Applies the rename operator to this relation.
|
Relation |
select(Expression selectCondition)
Applies the selection operator to this relation.
|
Expression |
softCondition()
An expression satisfied by all tuples in the relation.
|
String |
toString() |
allKnownAttributes, combineLimits, createSimpleRelation, isTrivial, tablespublic RelationImpl(ConnectedDB database, AliasMap aliases, Expression condition, Expression softCondition, Set<Join> joinConditions, Set<ProjectionSpec> projections, boolean isUnique, List<OrderSpec> orderSpecs, int limit, int limitInverse)
public ConnectedDB database()
public AliasMap aliases()
Relationpublic Expression condition()
Relationcondition in class RelationExpression.TRUE indicates no conditionpublic Expression softCondition()
RelationExpression.TRUE does not change the contents of
the relation. It is thus just an optional condition that can
be used for optimization, but can be dropped or ignored if
convenient. Typically, there is other Java code that ensures the
condition regardless of whether it is present here or not.
We use this in particular for adding IS NOT NULL constraints
on all nullable columns that need to have a non-NULL value to form a
triple or binding.softCondition in class RelationExpression.TRUE indicates no soft conditionpublic Set<Join> joinConditions()
RelationjoinConditions in class RelationJoinspublic Set<ProjectionSpec> projections()
Relationprojections in class RelationProjectionSpecspublic int limit()
Relationpublic int limitInverse()
RelationlimitInverse in class Relationpublic List<OrderSpec> orderSpecs()
RelationorderSpecs in class Relationpublic Relation select(Expression selectCondition)
RelationalOperatorsApplies the selection operator to this relation. The new relation will contain only the tuples for which the expression evaluates to true.
Selection on attributes that don't exist in the relation are considered to be always false and will cause an empty relation.
selectCondition - A boolean expressionpublic Relation renameColumns(ColumnRenamer renames)
RelationalOperatorsApplies the rename operator to this relation.
Renames of attributes that don't exist in the relation are ignored.
renames - A map from original to replacement namespublic Relation project(Set<? extends ProjectionSpec> projectionSpecs)
RelationalOperatorsApplies the projection operator to this relation.
The new relation will contain only the attributes given as the argument.
projectionSpecs - A set of ProjectionSpec instances