public class QueryOptimizer extends Object
Modifier and Type | Field and Description |
---|---|
protected Set<String> |
neverPerInstanceMixins |
protected boolean |
onlyRelations
Do we match only relations?
|
protected SchemaManager |
schemaManager |
protected LinkedList<Operand> |
toplevelOperands |
static String |
TYPE_DOCUMENT |
static String |
TYPE_RELATION |
static String |
TYPE_ROOT |
Constructor and Description |
---|
QueryOptimizer() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFacetFilterClauses(FacetFilter facetFilter) |
protected void |
analyzeToplevelOperands(Operand node)
Expand toplevel ANDed operands into simple list.
|
MultiExpression |
getOptimizedQuery(SQLQuery query,
FacetFilter facetFilter) |
protected static Set<String> |
getStringLiterals(LiteralList list) |
protected void |
simplifyToplevelOperands()
Simplify ecm:primaryType positive references, and non-per-instance mixin types.
|
protected void |
visitFromClause(FromClause node)
Finds all the types to take into account (all concrete types being a subtype of the passed types) based on the
FROM list.
|
public static final String TYPE_ROOT
public static final String TYPE_DOCUMENT
public static final String TYPE_RELATION
protected final SchemaManager schemaManager
protected final Set<String> neverPerInstanceMixins
protected final LinkedList<Operand> toplevelOperands
protected boolean onlyRelations
public QueryOptimizer()
public MultiExpression getOptimizedQuery(SQLQuery query, FacetFilter facetFilter)
protected void addFacetFilterClauses(FacetFilter facetFilter)
protected void visitFromClause(FromClause node)
Adds them as a ecm:primaryType match in the toplevel operands.
protected void analyzeToplevelOperands(Operand node)
protected void simplifyToplevelOperands()
protected static Set<String> getStringLiterals(LiteralList list)
Copyright © 2017 Nuxeo. All rights reserved.