Package org.basex.query.var
Class Variables
- java.lang.Object
-
- org.basex.query.expr.ExprInfo
-
- org.basex.query.var.Variables
-
-
Constructor Summary
Constructors Constructor Description Variables()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindExternal(QueryContext qc, QNmMap<Value> bindings)
Binds all external variables.void
check()
Checks if all variables were declared and are visible to all their references.void
checkUp()
Ensures that none of the variable expressions is updating.StaticVar
declare(Var var, Expr expr, AnnList anns, String doc, boolean external, VarScope vs)
Declares a new static variable.Iterator<StaticVar>
iterator()
org.basex.query.var.StaticVarRef
newRef(QNm name, StaticContext sc, InputInfo ii)
Returns a new reference to the (possibly not yet declared) variable with the given name.void
toString(QueryString qs)
Creates a query string.void
toXml(QueryPlan plan)
Creates a query plan.-
Methods inherited from class org.basex.query.expr.ExprInfo
description, info, toErrorString, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
declare
public StaticVar declare(Var var, Expr expr, AnnList anns, String doc, boolean external, VarScope vs) throws QueryException
Declares a new static variable.- Parameters:
var
- variableexpr
- bound expression, possiblynull
anns
- annotationsdoc
- xqdoc stringexternal
-external
flagvs
- variable scope- Returns:
- static variable reference
- Throws:
QueryException
- query exception
-
checkUp
public void checkUp() throws QueryException
Ensures that none of the variable expressions is updating.- Throws:
QueryException
- query exception
-
check
public void check() throws QueryException
Checks if all variables were declared and are visible to all their references.- Throws:
QueryException
- query exception
-
newRef
public org.basex.query.var.StaticVarRef newRef(QNm name, StaticContext sc, InputInfo ii) throws QueryException
Returns a new reference to the (possibly not yet declared) variable with the given name.- Parameters:
ii
- input infoname
- variable namesc
- static context- Returns:
- reference
- Throws:
QueryException
- if the variable is not visible
-
bindExternal
public void bindExternal(QueryContext qc, QNmMap<Value> bindings) throws QueryException
Binds all external variables.- Parameters:
qc
- query contextbindings
- variable bindings- Throws:
QueryException
- query exception
-
toXml
public void toXml(QueryPlan plan)
Description copied from class:ExprInfo
Creates a query plan.
-
toString
public void toString(QueryString qs)
Description copied from class:ExprInfo
Creates a query string.
-
-