| Modifier and Type | Field and Description |
|---|---|
Expr |
root
Root expression.
|
Expr[] |
steps
Path steps.
|
| Modifier and Type | Method and Description |
|---|---|
Path |
addPreds(Expr... pred)
Adds a predicate to the last step.
|
Expr |
comp(QueryContext ctx)
Compiles and optimizes the expression, assigns data types and
cardinalities.
|
protected abstract Expr |
compPath(QueryContext ctx)
Compiles the location path.
|
int |
count(Var v)
Counts how often the specified variable is used by an expression.
|
static Path |
get(InputInfo ii,
Expr r,
Expr... path)
Returns a new path instance.
|
void |
plan(Serializer ser)
Serializes the expression tree.
|
boolean |
removable(Var v)
Checks if the specified variable is replaceable by a context item.
|
Expr |
remove(Var v)
|
java.lang.String |
toString() |
boolean |
uses(Expr.Use use)
Indicates if an expression uses the specified type or operation.
|
checkBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkIO, checkItem, checkItr, checkItr, checkMap, checkNode, checkNoEmpty, checkStr, checkType, checkUp, checkUp, checkWrite, compBln, ebv, item, iter, optPre, preEval, size, test, type, valueaddText, compEbv, hasFreeVars, indexAccessible, indexEquivalent, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, sameAsdescription, infopublic static Path get(InputInfo ii, Expr r, Expr... path)
ii - input infor - root expression; can be a null referencepath - path stepspublic final Expr comp(QueryContext ctx) throws QueryException
Exprcomp in class Exprctx - query contextQueryException - query exceptionprotected abstract Expr compPath(QueryContext ctx) throws QueryException
ctx - query contextQueryException - query exceptionpublic final boolean uses(Expr.Use use)
ExprExpr.comp(org.basex.query.QueryContext) methods to test the properties of sub-expressions.
It will return true as soon as at least one test is successful.public final Path addPreds(Expr... pred)
pred - predicate to be addedpublic int count(Var v)
ExprGFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses as predicates and
remove statically bound or unused clausesGFLWOR.compHoist(org.basex.query.QueryContext) to hoist independent variablespublic boolean removable(Var v)
ExprPreds.removable(org.basex.query.util.Var), if one of the variables is used within
a predicate.MixedPath.removable(org.basex.query.util.Var), if the variable occurs within
the path.Group.removable(org.basex.query.util.Var), as the group by expression depends on
variable references.GFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses
into predicates.public Expr remove(Var v)
ExprVarRef expressions for the given variable
by a Context reference. This method is called by
GFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses as predicates.public final void plan(Serializer ser) throws java.io.IOException
ExprInfo