| Modifier and Type | Method and Description |
|---|---|
Expr |
comp(QueryContext ctx)
Compiles and optimizes the expression, assigns data types and
cardinalities.
|
int |
count(Var v)
Counts how often the specified variable is used by an expression.
|
static GFLWOR |
get(ForLet[] fl,
Expr whr,
Order ord,
Group grp,
Expr ret,
InputInfo ii)
Returns a GFLWOR instance.
|
Iter |
iter(QueryContext ctx)
Evaluates the expression and returns an iterator on the resulting items.
|
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 u)
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, optPre, preEval, size, test, type, valueaddText, compEbv, hasFreeVars, indexAccessible, indexEquivalent, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, sameAsdescription, infopublic static GFLWOR get(ForLet[] fl, Expr whr, Order ord, Group grp, Expr ret, InputInfo ii)
fl - variable inputswhr - where clauseord - order expressiongrp - group-by expressionret - return expressionii - input infopublic Expr comp(QueryContext ctx) throws QueryException
Exprcomp in class Exprctx - query contextQueryException - query exceptionpublic Iter iter(QueryContext ctx) throws QueryException
ExprExpr.item(org.basex.query.QueryContext, org.basex.util.InputInfo) must be implemented
by an expression, as it may be called by this method.iter in class ParseExprctx - query contextQueryException - query exceptionpublic final boolean uses(Expr.Use u)
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 int count(Var v)
Exprcomp(org.basex.query.QueryContext) to rewrite where clauses as predicates and
remove statically bound or unused clausescompHoist(org.basex.query.QueryContext) to hoist independent variablespublic final 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.comp(org.basex.query.QueryContext) to rewrite where clauses
into predicates.public final Expr remove(Var v)
ExprVarRef expressions for the given variable
by a Context reference. This method is called by
comp(org.basex.query.QueryContext) to rewrite where clauses as predicates.public final void plan(Serializer ser) throws java.io.IOException
ExprInfo