Modifier and Type | Method and Description |
---|---|
boolean |
accept(ASTVisitor visitor)
Traverses this expression, notifying the visitor of declared and used variables,
and checking the tree for other recursive properties.
|
AnnList |
annotations()
Returns annotations.
|
void |
compile(QueryContext qc)
Compiles the expression contained in this scope.
|
Expr |
compile(QueryContext qc,
VarScope o)
Compiles and optimizes the expression, assigns types and cardinalities.
|
boolean |
compiled()
Checks if this scope has already been compiled.
|
Expr |
copy(QueryContext qc,
VarScope o,
IntObjMap<Var> vs)
Copies an expression.
|
boolean |
has(Expr.Flag flag)
Indicates if an expression has the specified compiler property.
|
Item |
item(QueryContext qc,
InputInfo ii)
Evaluates the expression and returns the resulting item,
or a
null reference if the expression yields an empty sequence. |
String |
toString() |
boolean |
visit(ASTVisitor visitor)
Traverses this scope with the given
ASTVisitor . |
checkUp, count, exprSize, inline, plan, removable
atomItem, atomValue, checkAtomic, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, compBln, copyType, ctxValue, ebv, iter, optPre, optPre, preEval, seqType, seqType, size, test, toArray, toArray, toAtomItem, toB64, toB64, toBin, toBin, toBoolean, toBoolean, toBytes, toBytes, toDouble, toDouble, toElem, toEmptyNode, toEmptyToken, toFloat, toFunc, toItem, toLong, toLong, toMap, toMap, toNode, toNode, toNumber, toQNm, toQNm, toToken, toToken, value
atomIter, data, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isVacuous, isValue, iterable, markTailCalls, optimize, optimizeEbv, sameAs, typeCheck, uses, visitAll
addPlan, addPlan, description, planAttr, planElem, toErrorString
public void compile(QueryContext qc) throws QueryException
Scope
compile
in interface Scope
qc
- query contextQueryException
- compilation errorspublic Expr compile(QueryContext qc, VarScope o) throws QueryException
Expr
QueryContext.compile()
.compile
in class Single
qc
- query contexto
- variable scopeQueryException
- query exceptionpublic Item item(QueryContext qc, InputInfo ii)
Expr
null
reference if the expression yields an empty sequence.
If this method is not overwritten, Expr.iter(QueryContext)
must be implemented by an
expression, as it may be called by this method.public Expr copy(QueryContext qc, VarScope o, IntObjMap<Var> vs)
Expr
public boolean has(Expr.Flag flag)
Expr
true
if at least one test is successful.public boolean visit(ASTVisitor visitor)
Scope
ASTVisitor
.public boolean accept(ASTVisitor visitor)
Expr
public boolean compiled()
Scope
public AnnList annotations()
Copyright © 2005–2015 BaseX Team. All rights reserved.