Modifier and Type | Field and Description |
---|---|
static int |
MAX_UNION |
static java.lang.UnsupportedOperationException |
TOO_MANY_UNION |
Modifier and Type | Method and Description |
---|---|
void |
bindValue(java.lang.String varName,
PropertyValue value) |
Query |
buildAlternativeQuery()
Try to convert the query to an alternative form, specially a "union".
|
boolean |
containsUnfilteredFullTextCondition()
Whether the condition contains a fulltext condition that can not be
applied to the filter, for example because it is part of an "or" condition
of the form "where a=1 or contains(., 'x')".
|
Query |
copyOf()
returns a clone of the current object.
|
ResultImpl |
executeQuery() |
SelectorExecutionPlan |
getBestSelectorExecutionPlan(FilterImpl filter) |
java.util.List<java.lang.String> |
getBindVariableNames() |
PropertyValue |
getBindVariableValue(java.lang.String bindVariableName) |
int |
getColumnIndex(java.lang.String columnName) |
ColumnImpl[] |
getColumns() |
ConstraintImpl |
getConstraint() |
double |
getEstimatedCost()
Get the estimated cost.
|
ExecutionContext |
getExecutionContext() |
java.lang.String |
getIndexCostInfo()
Get the index cost as a JSON string.
|
java.util.Optional<java.lang.Long> |
getLimit() |
NamePathMapper |
getNamePathMapper() |
java.lang.String |
getOakPath(java.lang.String path)
Validate the path is syntactically correct, and convert it to an Oak
internal path (including namespace remapping if needed).
|
java.util.Optional<java.lang.Long> |
getOffset() |
OrderingImpl[] |
getOrderings() |
java.lang.String |
getPlan()
Get the query plan.
|
QueryStatsData.QueryExecutionStats |
getQueryExecutionStats() |
QueryOptions |
getQueryOptions() |
java.util.Iterator<ResultRowImpl> |
getRows() |
int |
getSelectorIndex(java.lang.String selectorName) |
java.lang.String[] |
getSelectorNames() |
QueryEngineSettings |
getSettings() |
long |
getSize()
Get the size if known.
|
long |
getSize(Result.SizePrecision precision,
long max)
Get the size if known.
|
SourceImpl |
getSource() |
java.lang.String |
getStatement() |
Tree |
getTree(java.lang.String path) |
void |
init()
Initialize the query.
|
boolean |
isInit() |
boolean |
isInternal() |
boolean |
isMeasureOrExplainEnabled() |
boolean |
isPotentiallySlow()
Whether the query is potentially slow.
|
boolean |
isSortedByIndex()
Returns whether the results will be sorted by index.
|
void |
prepare()
Prepare the query.
|
static long |
saturatedAdd(long x,
long y)
Add two values, but don't let it overflow or underflow.
|
void |
setDistinct(boolean distinct) |
void |
setExecutionContext(ExecutionContext context) |
void |
setExplain(boolean explain) |
void |
setInternal(boolean isInternal) |
void |
setLimit(long limit) |
void |
setMeasure(boolean measure) |
void |
setOffset(long offset) |
void |
setOrderings(OrderingImpl[] orderings) |
void |
setQueryOptions(QueryOptions options)
Set the query option to be used for this query.
|
void |
setTraversalEnabled(boolean traversalEnabled) |
java.lang.String |
toString() |
void |
verifyNotPotentiallySlow()
Verify the query is not potentially slow.
|
public static final java.lang.UnsupportedOperationException TOO_MANY_UNION
public static final int MAX_UNION
public void init()
Query
public ColumnImpl[] getColumns()
getColumns
in interface Query
public ConstraintImpl getConstraint()
public java.util.Optional<java.lang.Long> getLimit()
public java.util.Optional<java.lang.Long> getOffset()
public OrderingImpl[] getOrderings()
public SourceImpl getSource()
public void bindValue(java.lang.String varName, PropertyValue value)
public void setExplain(boolean explain)
setExplain
in interface Query
public void setMeasure(boolean measure)
setMeasure
in interface Query
public void setDistinct(boolean distinct)
public ResultImpl executeQuery()
executeQuery
in interface Query
public java.util.Iterator<ResultRowImpl> getRows()
public boolean isSortedByIndex()
Query
isSortedByIndex
in interface Query
public java.lang.String getPlan()
Query
public java.lang.String getIndexCostInfo()
Query
getIndexCostInfo
in interface Query
public double getEstimatedCost()
Query
getEstimatedCost
in interface Query
public void prepare()
Query
public int getSelectorIndex(java.lang.String selectorName)
getSelectorIndex
in interface Query
public int getColumnIndex(java.lang.String columnName)
getColumnIndex
in interface Query
public PropertyValue getBindVariableValue(java.lang.String bindVariableName)
public java.lang.String[] getSelectorNames()
getSelectorNames
in interface Query
public java.util.List<java.lang.String> getBindVariableNames()
getBindVariableNames
in interface Query
public void setTraversalEnabled(boolean traversalEnabled)
setTraversalEnabled
in interface Query
public void setQueryOptions(QueryOptions options)
Query
setQueryOptions
in interface Query
options
- the optionspublic SelectorExecutionPlan getBestSelectorExecutionPlan(FilterImpl filter)
public boolean isPotentiallySlow()
Query
isPotentiallySlow
in interface Query
public void verifyNotPotentiallySlow()
Query
verifyNotPotentiallySlow
in interface Query
public void setExecutionContext(ExecutionContext context)
setExecutionContext
in interface Query
public void setOrderings(OrderingImpl[] orderings)
setOrderings
in interface Query
public NamePathMapper getNamePathMapper()
public boolean isMeasureOrExplainEnabled()
isMeasureOrExplainEnabled
in interface Query
public java.lang.String getOakPath(java.lang.String path)
path
- the pathpublic java.lang.String toString()
toString
in class java.lang.Object
public long getSize()
Query
public long getSize(Result.SizePrecision precision, long max)
Query
public java.lang.String getStatement()
getStatement
in interface Query
public QueryEngineSettings getSettings()
public void setInternal(boolean isInternal)
setInternal
in interface Query
public ExecutionContext getExecutionContext()
public static long saturatedAdd(long x, long y)
x
- the first valuey
- the second valuepublic Query buildAlternativeQuery()
Query
Query.init()
.buildAlternativeQuery
in interface Query
this
if no conversions are possible or a new instance of
a Query
. Cannot return null.public Query copyOf()
Query
returns a clone of the current object. Will throw an exception in case it's invoked in a non
appropriate moment. For example the default QueryImpl
cannot be cloned once the
Query.init()
has been executed.
May return null if not implemented.
public boolean isInit()
public boolean isInternal()
isInternal
in interface Query
true
if the current query is internal. false
otherwise.public boolean containsUnfilteredFullTextCondition()
Query
containsUnfilteredFullTextCondition
in interface Query
public QueryOptions getQueryOptions()
public QueryStatsData.QueryExecutionStats getQueryExecutionStats()
getQueryExecutionStats
in interface Query
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.