Package org.basex.query.var
Class Variables
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.var.Variables
Container of global variables of a module.
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbindExternal(QueryContext qc, QNmMap<Value> bindings) Binds all external variables.voidcheck()Checks if all variables were declared and are visible to all their references.voidcheckUp()Ensures that none of the variable expressions is updating.Declares a new static variable.iterator()org.basex.query.var.StaticVarRefnewRef(QNm name, StaticContext sc, InputInfo ii) Returns a new reference to the (possibly not yet declared) variable with the given name.voidCreates a query plan.voidplan(QueryString qs) Creates a query string.Methods inherited from class org.basex.query.expr.ExprInfo
description, toErrorString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Variables
public Variables()
-
-
Method Details
-
declare
public StaticVar declare(Var var, AnnList anns, Expr expr, boolean ext, String doc, VarScope vs) throws QueryException Declares a new static variable.- Parameters:
var- variableanns- annotationsexpr- bound expression, possiblynullext-externalflagdoc- xqdoc stringvs- variable scope- Returns:
- static variable reference
- Throws:
QueryException- query exception
-
checkUp
Ensures that none of the variable expressions is updating.- Throws:
QueryException- query exception
-
check
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
Binds all external variables.- Parameters:
qc- query contextbindings- variable bindings- Throws:
QueryException- query exception
-
iterator
-
plan
Description copied from class:ExprInfoCreates a query plan. -
plan
Description copied from class:ExprInfoCreates a query string.
-