Package org.basex.query.func.fn
Class FnSlice
- 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.FnSlice
-
- Direct Known Subclasses:
ArraySlice
public class FnSlice extends StandardFunc
Function implementation.- Author:
- BaseX Team 2005-23, BSD License, Christian Gruen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FnSlice.Slice
Slice properties.
-
Field Summary
-
Fields inherited from class org.basex.query.func.StandardFunc
definition, sc
-
-
Constructor Summary
Constructors Constructor Description FnSlice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expr
opt(CompileContext cc)
Performs function specific optimizations.protected FnSlice.Slice
slice(long size, QueryContext qc)
Returns slice properties.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
accept, 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 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
public 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
-
slice
protected final FnSlice.Slice slice(long size, QueryContext qc) throws QueryException
Returns slice properties.- Parameters:
size
- input sizeqc
- query context- Returns:
- slice properties
- Throws:
QueryException
- query exception
-
-