| Constructor and Description |
|---|
FuncItem(QNm n,
Var[] arg,
Expr body,
FuncType t,
boolean cst)
Constructor.
|
FuncItem(Var[] arg,
Expr body,
FuncType t,
VarStack cl,
boolean cst)
Constructor for anonymous functions.
|
| Modifier and Type | Method and Description |
|---|---|
int |
arity()
Number of arguments this function item takes.
|
FItem |
coerceTo(FuncType ft,
QueryContext ctx,
InputInfo ii)
Coerces this function item to the given function type.
|
int |
count(Var v)
Counts how often the specified variable is used by an expression.
|
QNm |
fName()
Name of this function,
null means anonymous function. |
Item |
invItem(QueryContext ctx,
InputInfo ii,
Value... args)
Invokes this function item with the given arguments.
|
Iter |
invIter(QueryContext ctx,
InputInfo ii,
Value... args)
Invokes this function item with the given arguments.
|
Value |
invValue(QueryContext ctx,
InputInfo ii,
Value... args)
Invokes this function item with the given arguments.
|
void |
plan(Serializer ser)
Serializes the expression tree.
|
java.lang.String |
toString() |
boolean |
uses(Expr.Use u)
Indicates if an expression uses the specified type or operation.
|
bool, comparable, dbl, dec, diff, ebv, equiv, flt, hash, homogenous, input, isItem, item, itemAt, iter, iterable, itr, score, score, serialize, size, test, type, writeTo, xdmInfocache, comp, data, description, info, isValue, iter, iterator, removable, remove, valueaddText, compEbv, hasFreeVars, indexAccessible, indexEquivalent, isEmpty, isFunction, isVacuous, markTailCalls, sameAspublic FuncItem(QNm n, Var[] arg, Expr body, FuncType t, boolean cst)
n - function namearg - function argumentsbody - function bodyt - function typecst - cast flagpublic int arity()
FItempublic QNm fName()
FItemnull means anonymous function.public Value invValue(QueryContext ctx, InputInfo ii, Value... args) throws QueryException
FIteminvValue in class FItemctx - query contextii - input infoargs - argumentsQueryException - query exceptionpublic Iter invIter(QueryContext ctx, InputInfo ii, Value... args) throws QueryException
FIteminvIter in class FItemctx - query contextii - input infoargs - argumentsQueryException - query exceptionpublic Item invItem(QueryContext ctx, InputInfo ii, Value... args) throws QueryException
FIteminvItem in class FItemctx - query contextii - input infoargs - argumentsQueryException - query exceptionpublic 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 int count(Var v)
ExprGFLWOR.comp(org.basex.query.QueryContext) to rewrite where clauses as predicates and
remove statically bound or unused clausesGFLWOR.compHoist(org.basex.query.QueryContext) to hoist independent variablespublic FItem coerceTo(FuncType ft, QueryContext ctx, InputInfo ii) throws QueryException
FItemcoerceTo in class FItemft - function typectx - query contextii - input infoQueryException - query exceptionpublic void plan(Serializer ser) throws java.io.IOException
ExprInfo