Interface IQueryMetaContext
-
- All Known Implementing Classes:
AbstractQueryMetaContext
,EMFQueryMetaContext
public interface IQueryMetaContext
Provides metamodel information (relationship of input keys) to query evaluator backends at runtime and at query planning time.- No Implement:
- Implementors should extend
AbstractQueryMetaContext
instead of directly implementing this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canLeadOutOfScope(IInputKey key)
Tells whether the givenIInputKey
is an edge and may lead out of scope.java.util.Map<InputKeyImplication,java.util.Set<InputKeyImplication>>
getConditionalImplications(IInputKey implyingKey)
Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys).java.util.Map<java.util.Set<java.lang.Integer>,java.util.Set<java.lang.Integer>>
getFunctionalDependencies(IInputKey key)
Returns functional dependencies of the input key expressed in terms of column indices.java.util.Collection<InputKeyImplication>
getImplications(IInputKey implyingKey)
Returns known direct implications, e.g.IPosetComparator
getPosetComparator(java.lang.Iterable<IInputKey> keys)
Returns anIPosetComparator
for the given set ofIInputKey
s.java.util.Comparator<IInputKey>
getSuggestedEliminationOrdering()
For query normalizing, this is the order suggested for trying to eliminate input keys.java.util.Collection<InputKeyImplication>
getWeakenedAlternatives(IInputKey implyingKey)
Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.boolean
isEnumerable(IInputKey key)
Returns true iff instance tuples of the given key can be enumerated.boolean
isPosetKey(IInputKey key)
Returns true if the givenIInputKey
represents a poset type.boolean
isStateless(IInputKey key)
Returns true iff the set of instance tuples of the given key is immutable.
-
-
-
Method Detail
-
isEnumerable
boolean isEnumerable(IInputKey key)
Returns true iff instance tuples of the given key can be enumerated.If false, the runtime can only test tuple membership in the extensional relation identified by the key, but not enumerate member tuples in general.
Equivalent to
IInputKey.isEnumerable()
.
-
isStateless
boolean isStateless(IInputKey key)
Returns true iff the set of instance tuples of the given key is immutable.If false, the runtime provides notifications upon change.
-
getWeakenedAlternatives
java.util.Collection<InputKeyImplication> getWeakenedAlternatives(IInputKey implyingKey)
Returns a set of implications (weakened alternatives), with a suggestion for the query planner that satisfying them first may help in satisfying the implying key.Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
Must follow directly or transitively from implications of
getImplications(IInputKey)
.- Since:
- 1.6
-
getImplications
java.util.Collection<InputKeyImplication> getImplications(IInputKey implyingKey)
Returns known direct implications, e.g. edge supertypes, edge opposites, node type constraints, etc.Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys.
-
getConditionalImplications
java.util.Map<InputKeyImplication,java.util.Set<InputKeyImplication>> getConditionalImplications(IInputKey implyingKey)
Returns known "double dispatch" implications, where the given implying key implies other input keys under certain additional conditions (themselves input keys). For example, a "type x, unscoped" input key may imply the "type x, in scope" input key under the condition of the input key "x is in scope"Note that for the obvious reasons, enumerable keys can only be implied by enumerable keys (either as the implying key or as the additional condition).
Note that symmetry is not required, i.e. the additional conditions do not have to list the same conditional implication.
- Returns:
- multi-map, where the keys are additional conditions and the values are input key implications jointly implied by the condition and the given implying key.
- Since:
- 2.0
-
getFunctionalDependencies
java.util.Map<java.util.Set<java.lang.Integer>,java.util.Set<java.lang.Integer>> getFunctionalDependencies(IInputKey key)
Returns functional dependencies of the input key expressed in terms of column indices.Each entry of the map is a functional dependency rule, where the entry key specifies source columns and the entry value specifies target columns.
-
getSuggestedEliminationOrdering
java.util.Comparator<IInputKey> getSuggestedEliminationOrdering()
For query normalizing, this is the order suggested for trying to eliminate input keys.- Since:
- 1.6
-
canLeadOutOfScope
boolean canLeadOutOfScope(IInputKey key)
Tells whether the givenIInputKey
is an edge and may lead out of scope.- Since:
- 1.6
-
isPosetKey
boolean isPosetKey(IInputKey key)
Returns true if the givenIInputKey
represents a poset type.- Since:
- 1.6
-
getPosetComparator
IPosetComparator getPosetComparator(java.lang.Iterable<IInputKey> keys)
Returns anIPosetComparator
for the given set ofIInputKey
s.- Parameters:
keys
- an iterable collection of input keys- Returns:
- the poset comparator
- Since:
- 1.6
-
-