Package org.basex.query.expr.gflwor
Class Clause
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.expr.Expr
org.basex.query.expr.ParseExpr
org.basex.query.expr.gflwor.Clause
A FLWOR clause.
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidcalcSize(long[] minMax) Calculates the minimum and maximum number of results.abstract ClauseCompiles and optimizes the expression, assigns types and cardinalities.abstract Clausecopy(CompileContext cc, IntObjMap<Var> vm) Copies an expression.final booleanChecks if the given variable is declared by this clause.abstract Clauseinline(InlineContext ic) Inlines an expression into this one, replacing all variable or context references.abstract ClauseOptimizes an already compiled expression without recompiling its sub-expressions.final Var[]vars()All declared variables of this clause.Methods inherited from class org.basex.query.expr.ParseExpr
adoptType, atomValue, checkAllUp, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, checkType, checkUp, copyType, ctxValue, ebv, item, iter, 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
accept, arg, args, atomItem, atomIter, checkUp, count, data, data, ddo, equals, exprSize, funcType, has, hasFreeVars, indexAccessible, inlineable, isSimple, markTailCalls, mergeEbv, simplifyFor, typeCheck, uses, vacuous, visitAllMethods inherited from class org.basex.query.expr.ExprInfo
description, plan, plan, toErrorString, toString
-
Method Details
-
compile
Description copied from class:ExprCompiles and optimizes the expression, assigns types and cardinalities.- Specified by:
compilein classExpr- Parameters:
cc- compilation context- Returns:
- optimized expression
- Throws:
QueryException- query exception
-
optimize
Description copied from class:ExprOptimizes an already compiled expression without recompiling its sub-expressions.- Overrides:
optimizein classExpr- Parameters:
cc- compilation context- Returns:
- optimized expression
- Throws:
QueryException- query exception
-
inline
Description copied from class:ExprInlines an expression into this one, replacing all variable or context references. This function is called byInlineContext.inline(Expr)(see invocations of this functions for further inlinings). The variable reference is replaced in: The context is replaced in:- Specified by:
inlinein classExpr- Parameters:
ic- inlining context- Returns:
- resulting expression if something has changed,
nullotherwise - Throws:
QueryException- query exception
-
copy
Description copied from class:ExprCopies an expression. Used for inlining functions, or for copying static queries. It is utilized byVarRef.inline(org.basex.query.InlineContext),FuncItem.inline(org.basex.query.expr.Expr[], org.basex.query.CompileContext),Closure.inline(org.basex.query.InlineContext)andStaticFunc.inline(org.basex.query.expr.Expr[], org.basex.query.CompileContext).- Specified by:
copyin classExpr- Parameters:
cc- compilation contextvm- mapping from old variable IDs to new variable copies. Required byClosure.copy(org.basex.query.CompileContext, org.basex.util.hash.IntObjMap<org.basex.query.var.Var>)andVarRef.copy(org.basex.query.CompileContext, org.basex.util.hash.IntObjMap<org.basex.query.var.Var>)- Returns:
- copied expression
-
vars
All declared variables of this clause.- Returns:
- declared variables
-
declares
Checks if the given variable is declared by this clause.- Parameters:
var- variable- Returns:
- {code true} if the variable was declared here,
falseotherwise
-
calcSize
public void calcSize(long[] minMax) Calculates the minimum and maximum number of results.- Parameters:
minMax- minimum and maximum number of incoming tuples
-