Package org.basex.query.func.fn
Class FnError
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.expr.Expr
org.basex.query.expr.ParseExpr
org.basex.query.expr.Arr
org.basex.query.func.StandardFunc
org.basex.query.func.fn.FnError
Function implementation.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
Fields inherited from class org.basex.query.func.StandardFunc
definition, sc -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StandardFuncget(QueryException ex, SeqType st, StaticContext sc) Creates an error function instance.item(QueryContext qc, InputInfo ii) Evaluates the expression and returns the resulting item, orEmpty.VALUEif the expression yields an empty sequence.iter(QueryContext qc) Evaluates the expression and returns an iterator on the resulting items.protected ExprtypeCheck(TypeCheck tc, CompileContext cc) Tries to push the given type check inside this expression.booleanvacuous()Tests if this is a vacuous expression (empty sequence or error function).Methods inherited from class org.basex.query.func.StandardFunc
checkAdmin, checkArity, checkArity, checkCreate, checkData, checkPath, checkPath, coerceFunc, compileData, copy, data, data, dataLock, dateTimeToMs, description, equals, has, opt, optFirst, optFirst, optimize, plan, plan, serialize, simplifyArgs, toBaseUri, toBindings, toCollation, toDate, toDBNode, toEncodingOrNull, toNodeOrAtomItem, toOptions, toPath, toPath, toQuery, toQueryMethods inherited from class org.basex.query.expr.Arr
accept, allAreValues, args, checkUp, compile, copyAll, count, exprSize, flatten, inline, inline, inlineable, mayBePositional, simplifyAllMethods inherited from class org.basex.query.expr.ParseExpr
adoptType, atomValue, checkAllUp, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, checkType, checkUp, copyType, ctxValue, ebv, refineType, seqType, size, test, toArray, toArray, toAtomItem, toB64, toB64, toBin, toBin, toBoolean, toBoolean, toBytes, toBytes, toDouble, toDouble, toElem, toFloat, toFunc, toItem, toItem, toLong, toLong, toMap, toMap, toNode, toNode, toNodeOrNull, toNumber, toNumberOrNull, toQNm, toQNm, toToken, toToken, toTokenOrNull, toZeroToken, valueMethods inherited from class org.basex.query.expr.Expr
arg, atomItem, atomIter, ddo, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, simplifyFor, uses, visitAllMethods inherited from class org.basex.query.expr.ExprInfo
toErrorString, toString
-
Constructor Details
-
FnError
public FnError()
-
-
Method Details
-
iter
Description copied from class:ExprEvaluates the expression and returns an iterator on the resulting items. The implementation of this method is optional. -
item
Description copied from class:ExprEvaluates the expression and returns the resulting item, orEmpty.VALUEif the expression yields an empty sequence. If this method is not implemented,Expr.value(QueryContext)must be implemented instead.- Overrides:
itemin classParseExpr- Parameters:
qc- query contextii- input info (only required bySeqinstances, which have no input info)- Returns:
- item or
Empty.VALUE - Throws:
QueryException- query exception
-
vacuous
public boolean vacuous()Description copied from class:ExprTests if this is a vacuous expression (empty sequence or error function). This check is needed for updating queries.- Overrides:
vacuousin classStandardFunc- Returns:
- result of check
-
typeCheck
Description copied from class:ExprTries to push the given type check inside this expression. -
get
Creates an error function instance.- Parameters:
ex- query exceptionst- type of the expression that caused the error messagesc- static context- Returns:
- function
-