public class OrderByClause extends Clause
Modifier and Type | Field and Description |
---|---|
static OperandRole |
SORT_KEYS_ROLE |
COUNT, FOR, GROUPBYCLAUSE, LET, ORDERBYCLAUSE, TRACE, WHERE, WINDOW
Constructor and Description |
---|
OrderByClause(FLWORExpression flwor,
SortKeyDefinition[] sortKeys,
TupleExpression tupleExpression) |
Modifier and Type | Method and Description |
---|---|
void |
addToPathMap(PathMap pathMap,
PathMap.PathMapNodeSet pathMapNodeSet)
Collect information about the navigation paths followed by this clause, for document projection purposes
|
boolean |
containsNonInlineableVariableReference(Binding binding)
Determine whether the clause contains a reference to a local variable binding that cannot be inlined
|
OrderByClause |
copy(FLWORExpression flwor,
RebindingMap rebindings)
Create a copy of this clause
|
AtomicValue |
evaluateSortKey(int n,
XPathContext c)
Callback for evaluating the sort keys
|
void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure.
|
AtomicComparer[] |
getAtomicComparers() |
int |
getClauseKey()
Get a keyword identifying what kind of clause this is
|
TuplePull |
getPullStream(TuplePull base,
XPathContext context)
Get a tuple stream that implements the functionality of this clause, taking its
input from another tuple stream which this clause modifies
|
TuplePush |
getPushStream(TuplePush destination,
XPathContext context)
Get a push-mode tuple stream that implements the functionality of this clause, supplying its
output to another tuple stream
|
SortKeyDefinitionList |
getSortKeyDefinitions() |
TupleExpression |
getTupleExpression() |
void |
processOperands(OperandProcessor processor)
Process the subexpressions of this clause
|
java.lang.String |
toString() |
void |
typeCheck(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Type-check the expression
|
gatherVariableReferences, getConfiguration, getLocation, getPackageData, getRangeVariables, isRepeated, optimize, refineVariableType, setLocation, setPackageData, setRepeated, toShortString
public static final OperandRole SORT_KEYS_ROLE
public OrderByClause(FLWORExpression flwor, SortKeyDefinition[] sortKeys, TupleExpression tupleExpression)
public int getClauseKey()
Clause
getClauseKey
in class Clause
public boolean containsNonInlineableVariableReference(Binding binding)
Clause
containsNonInlineableVariableReference
in class Clause
binding
- the binding for the local variable in questionpublic OrderByClause copy(FLWORExpression flwor, RebindingMap rebindings)
Clause
public SortKeyDefinitionList getSortKeyDefinitions()
public AtomicComparer[] getAtomicComparers()
public TupleExpression getTupleExpression()
public TuplePull getPullStream(TuplePull base, XPathContext context)
getPullStream
in class Clause
base
- the input tuple streamcontext
- XQuery dynamic contextpublic TuplePush getPushStream(TuplePush destination, XPathContext context)
getPushStream
in class Clause
destination
- the output tuple streamcontext
- XQuery dynamic contextpublic void processOperands(OperandProcessor processor) throws XPathException
processOperands
in class Clause
processor
- the expression processor used to process the subexpressionsXPathException
- if any error is detectedpublic void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
typeCheck
in class Clause
visitor
- the ExpressionVisitor, providing access to static context informationcontextInfo
- static information about the dynamic contextXPathException
- if any error is detectedpublic void addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Clause
addToPathMap
in class Clause
pathMap
- the path map in which the data is to be collectedpathMapNodeSet
- the path map node set representing the paths to the context itempublic void explain(ExpressionPresenter out) throws XPathException
explain
in class Clause
out
- the expression presenter used to display the structureXPathException
public java.lang.String toString()
toString
in class java.lang.Object
public AtomicValue evaluateSortKey(int n, XPathContext c) throws XPathException
n
- identifies the sort key to be evaluatedc
- the dynamic context for evaluation of the sort keyXPathException
- if evaluation of the sort key failsCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.