Package org.basex.query.func.db
Class DbGetId
- 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.db.DbGetId
-
- Direct Known Subclasses:
DbGetPre
public class DbGetId extends StandardFunc
Function implementation.- Author:
- BaseX Team 2005-23, BSD License, Christian Gruen
-
-
Field Summary
-
Fields inherited from class org.basex.query.func.StandardFunc
definition, sc
-
-
Constructor Summary
Constructors Constructor Description DbGetId()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(ASTVisitor visitor)
Traverses this expression, notifying the visitor of declared and used variables, and checking the tree for other recursive properties.protected Expr
opt(CompileContext cc)
Performs function specific optimizations.protected int
pre(int id, Data data)
Returns the pre value for the specified id.protected String
toName(Expr expr, boolean empty, QueryContext qc)
Evaluates an expression to a database name.Value
value(QueryContext qc)
Evaluates the expression and returns the resulting value.-
Methods inherited from class org.basex.query.func.StandardFunc
checkPerm, coerceFunc, compileData, copy, dataLock, defined, description, embed, equals, has, optFirst, optFirst, optimize, serialize, simplifyArgs, toBaseUri, toBindings, toCollation, toCollationOrDefault, toContent, toContent, toData, toDate, toDBNode, toEncodingOrNull, toFunction, toFunction, toIO, toIO, toMs, toName, toNodeOrAtomItem, toOptions, toOptions, toPath, toPath, toStr, toString, toXml, toZeroStr, updating, vacuous
-
Methods inherited from class org.basex.query.expr.Arr
allAreValues, arg, args, checkUp, compile, copyAll, count, exprSize, flatten, inline, inlineable, mayBePositional, removeEmpty, simplifyAll
-
Methods inherited from class org.basex.query.expr.ParseExpr
adoptType, atomValue, checkAllUp, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, checkType, checkUp, copyType, ctxValue, data, ebv, info, item, iter, refineType, seqType, size, test, toArray, toArray, toAtomItem, toB64, toB64, toB64OrNull, toBin, toBin, toBoolean, toBoolean, toBooleanOrFalse, toBytes, toBytes, toDouble, toDouble, toElem, toElem, toFloat, toFunction, toItem, toItem, toLong, toLong, toMap, toMap, toNode, toNode, toNodeOrNull, toNumber, toNumberOrNull, toQNm, toQNmOrNull, toString, toString, toStringOrNull, toToken, toToken, toTokenOrNull, toZeroToken
-
Methods inherited from class org.basex.query.expr.Expr
arg, atomItem, atomIter, ddo, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, optimizePos, simplify, simplifyFor, typeCheck, uses, visitAll
-
Methods inherited from class org.basex.query.expr.ExprInfo
toErrorString, toString
-
-
-
-
Method Detail
-
value
public final Value value(QueryContext qc) throws QueryException
Description copied from class:Expr
Evaluates the expression and returns the resulting value. If this method is not implemented,Expr.item(QueryContext, InputInfo)
must be implemented instead.- Overrides:
value
in classParseExpr
- Parameters:
qc
- query context- Returns:
- value
- Throws:
QueryException
- query exception
-
opt
protected final Expr opt(CompileContext cc) throws QueryException
Description copied from class:StandardFunc
Performs function specific optimizations.- Overrides:
opt
in classStandardFunc
- Parameters:
cc
- compilation context- Returns:
- optimized or original expression
- Throws:
QueryException
- query exception
-
pre
protected int pre(int id, Data data)
Returns the pre value for the specified id.- Parameters:
id
- iddata
- data reference- Returns:
- pre value
-
toName
protected final String toName(Expr expr, boolean empty, QueryContext qc) throws QueryException
Evaluates an expression to a database name.- Parameters:
expr
- expressionempty
- allow empty nameqc
- query context- Returns:
- database name (empty string for general data)
- Throws:
QueryException
- query exception
-
accept
public boolean accept(ASTVisitor visitor)
Description copied from class:Expr
Traverses this expression, notifying the visitor of declared and used variables, and checking the tree for other recursive properties.
-
-