public final class VarContext extends ExprInfo
| Constructor and Description |
|---|
VarContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Var v)
Adds a local variable.
|
VarStack |
cache(int c)
Creates a new variable stack and returns the old one.
|
void |
checkUp()
Checks if none of the global variables contains an updating expression.
|
Var |
get(QNm var)
Returns a variable with the specified name.
|
Var |
get(Var name)
Returns a variable instance with the same id.
|
VarStack |
globals()
Returns the global variables.
|
VarStack |
locals()
Returns the local variables.
|
void |
plan(Serializer ser)
Serializes the expression tree.
|
void |
reset(VarStack l)
Resets the local variables to the specified instance.
|
int |
size()
Returns the current number of local variables.
|
void |
size(int s)
Sets the number of local variables to the specified value.
|
java.lang.String |
toString() |
void |
updateGlobal(Var v)
Adds or replaces a global variable.
|
description, infopublic VarStack globals()
public VarStack locals()
public VarStack cache(int c)
c - stack capacitypublic void reset(VarStack l)
l - local variablespublic void updateGlobal(Var v)
v - variable to be addedpublic void add(Var v)
v - variablepublic Var get(QNm var)
var - variablepublic Var get(Var name)
name - variable namepublic void checkUp()
throws QueryException
QueryParser.QueryException - query exceptionpublic void plan(Serializer ser) throws java.io.IOException
ExprInfopublic int size()
public void size(int s)
s - number of variables to be set