public class NativeNodeImpl extends LeafIQTreeImpl implements NativeNode
iqFactory| Modifier and Type | Method and Description |
|---|---|
LeafIQTree |
acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer)
"Accept" method for the "Visitor" pattern.
|
IQTree |
acceptTransformer(IQTreeVisitingTransformer transformer) |
<T> T |
acceptVisitor(IQVisitor<T> visitor) |
void |
acceptVisitor(QueryNodeVisitor visitor)
"Accept" method for the "Visitor" pattern.
|
IQTree |
applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution)
Applies the descending substitution WITHOUT applying any additional optimization.
|
IQTree |
applyFreshRenaming(InjectiveVar2VarSubstitution freshRenamingSubstitution)
Particular type of descending substitution: only renaming some variables by external ones.
|
IQTree |
applyFreshRenamingToAllVariables(InjectiveVar2VarSubstitution freshRenamingSubstitution)
Identical to applyFreshRenaming, but also applies to non projected variables
|
com.google.common.collect.ImmutableMap<Variable,QuotedID> |
getColumnNames()
Needed because certain DBs like Oracle impose constraints on the length of a column name,
so the column name may differ from the variable name.
|
com.google.common.collect.ImmutableSet<Variable> |
getKnownVariables()
Variables present in the tree
|
com.google.common.collect.ImmutableSet<Variable> |
getLocallyDefinedVariables()
Locally defined variables must not appear in the sub-tree
|
com.google.common.collect.ImmutableSet<Variable> |
getLocallyRequiredVariables()
Set of variables that this node, INDEPENDENTLY OF THE REQUIREMENTS OF ITS ANCESTORS,
requires to be defined in the sub-tree.
|
com.google.common.collect.ImmutableSet<Variable> |
getLocalVariables()
Set of variables MENTIONED in the node, INDEPENDENTLY of its sub-tree.
|
String |
getNativeQueryString() |
com.google.common.collect.ImmutableSet<Variable> |
getNotInternallyRequiredVariables()
Variables that are the tree proposes for removal if the ancestor trees do not need them.
|
com.google.common.collect.ImmutableSet<Variable> |
getRequiredVariables(IntermediateQuery query)
Set of variables which, individually, must be provided by at least one child,
INDEPENDENTLY OF THE REQUIREMENTS OF THIS NODE'S ANCESTORS.
|
com.google.common.collect.ImmutableMap<Variable,DBTermType> |
getTypeMap()
Every variable is guaranteed to have a type
|
VariableNullability |
getVariableNullability() |
com.google.common.collect.ImmutableSortedSet<Variable> |
getVariables()
This set is sorted, useful for instance for using JDBC result sets
|
com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> |
inferUniqueConstraints()
Dummy implementation (considered too late for inferring it)
|
boolean |
isDeclaredAsEmpty()
Returns true if corresponds to a EmptyNode
|
boolean |
isDistinct()
TODO: implement seriously
|
boolean |
isEquivalentTo(QueryNode queryNode)
Is syntactically equivalent
|
boolean |
isSyntacticallyEquivalentTo(QueryNode node)
TODO: explain
|
boolean |
isVariableNullable(IntermediateQuery query,
Variable variable)
Returns true if it cannot guarantee the projected variable to be non-null
Throws an IllegalArgumentException if the variable is not projected by the node
|
String |
toString() |
void |
validate() |
applyDescendingSubstitution, getChildren, getPossibleVariableDefinitions, getRootNode, isConstructed, isEquivalentTo, liftIncompatibleDefinitions, normalizeForOptimization, propagateDownConstraint, removeDistincts, replaceSubTreecloneequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRootNodeapplyDescendingSubstitution, getChildren, getPossibleVariableDefinitions, isConstructed, isEquivalentTo, isLeaf, liftIncompatibleDefinitions, normalizeForOptimization, propagateDownConstraint, removeDistincts, replaceSubTreepublic com.google.common.collect.ImmutableMap<Variable,DBTermType> getTypeMap()
NativeNodegetTypeMap in interface NativeNodepublic String getNativeQueryString()
getNativeQueryString in interface NativeNodepublic void acceptVisitor(QueryNodeVisitor visitor)
QueryNodeacceptVisitor in interface QueryNodepublic LeafIQTree acceptNodeTransformer(HomogeneousQueryNodeTransformer transformer) throws QueryNodeTransformationException
QueryNodeacceptNodeTransformer in interface LeafIQTreeacceptNodeTransformer in interface QueryNodeQueryNodeTransformationExceptionpublic com.google.common.collect.ImmutableSet<Variable> getLocalVariables()
QueryNodegetLocalVariables in interface QueryNodepublic boolean isVariableNullable(IntermediateQuery query, Variable variable)
QueryNodeisVariableNullable in interface QueryNodepublic boolean isSyntacticallyEquivalentTo(QueryNode node)
QueryNodeisSyntacticallyEquivalentTo in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getLocallyRequiredVariables()
QueryNodegetLocallyRequiredVariables in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getRequiredVariables(IntermediateQuery query)
QueryNodegetRequiredVariables in interface QueryNodepublic com.google.common.collect.ImmutableSet<Variable> getLocallyDefinedVariables()
QueryNodegetLocallyDefinedVariables in interface QueryNodepublic boolean isEquivalentTo(QueryNode queryNode)
QueryNodeisEquivalentTo in interface QueryNodepublic com.google.common.collect.ImmutableSortedSet<Variable> getVariables()
NativeNodegetVariables in interface IQTreegetVariables in interface ExplicitVariableProjectionNodegetVariables in interface NativeNodepublic com.google.common.collect.ImmutableMap<Variable,QuotedID> getColumnNames()
NativeNodegetColumnNames in interface NativeNodepublic IQTree acceptTransformer(IQTreeVisitingTransformer transformer)
acceptTransformer in interface IQTreepublic <T> T acceptVisitor(IQVisitor<T> visitor)
acceptVisitor in interface IQTreepublic IQTree applyFreshRenaming(InjectiveVar2VarSubstitution freshRenamingSubstitution)
IQTreeapplyFreshRenaming in interface IQTreepublic IQTree applyFreshRenamingToAllVariables(InjectiveVar2VarSubstitution freshRenamingSubstitution)
IQTreeapplyFreshRenamingToAllVariables in interface IQTreepublic IQTree applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution)
IQTreeapplyDescendingSubstitutionWithoutOptimizing in interface IQTreepublic com.google.common.collect.ImmutableSet<Variable> getKnownVariables()
IQTreegetKnownVariables in interface IQTreepublic boolean isDistinct()
isDistinct in interface IQTreepublic boolean isDeclaredAsEmpty()
IQTreeisDeclaredAsEmpty in interface IQTreepublic VariableNullability getVariableNullability()
getVariableNullability in interface IQTreepublic void validate()
throws InvalidIntermediateQueryException
validate in interface IQTreeInvalidIntermediateQueryExceptionpublic com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> inferUniqueConstraints()
inferUniqueConstraints in interface IQTreepublic com.google.common.collect.ImmutableSet<Variable> getNotInternallyRequiredVariables()
IQTreegetNotInternallyRequiredVariables in interface IQTreeCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.