public class QueryOptions extends Object implements IQueryOptions
Modifier and Type | Field and Description |
---|---|
static IQueryOptions |
DISTINCT
An instance specifying
distinct := true but none of the
other IQueryOptions . |
static IQueryOptions |
NONE
An instance specifying NONE of the constraints declared by
IQueryOptions . |
Constructor and Description |
---|
QueryOptions(boolean distinct,
boolean stable,
ISortOrder[] orderBy,
ISlice slice) |
Modifier and Type | Method and Description |
---|---|
ISortOrder[] |
getOrderBy()
An optional array of
ISortOrder s describing the sort order that
will be imposed on the generated solutions when the rule is evaluated as
a query. |
ISlice |
getSlice()
An optional
ISlice describing a constraint on the first
solution and the maximum #of solutions to be materialized by a
query. |
boolean |
isDistinct()
true if a DistinctFilter should be applied when
the query is evaluated. |
boolean |
isStable()
Return
true iff query evaluation must be stable. |
String |
toString() |
public static final transient IQueryOptions NONE
IQueryOptions
.public static final transient IQueryOptions DISTINCT
distinct := true
but none of the
other IQueryOptions
.public QueryOptions(boolean distinct, boolean stable, ISortOrder[] orderBy, ISlice slice)
distinct
- stable
- orderBy
- slice
- IllegalArgumentException
- if a stable is false
and a slice is
specified with a non-zero offset and/or a non-Long.MAX_VALUE
limitpublic final boolean isDistinct()
IQueryOptions
true
if a DistinctFilter
should be applied when
the query is evaluated.isDistinct
in interface IQueryOptions
public final boolean isStable()
IQueryOptions
true
iff query evaluation must be stable. Stable
query evaluation requires that the same query executed against the same
commit point will produce the same solutions in the same order. This
constraint requires that (a) query execution does not use any
parallelism; and (b) all IStepTask
are determinate. Stable
queries may be useful when using an ISlice
to page through a
solution set.isStable
in interface IQueryOptions
true
if query evaluation must be stable.public final ISortOrder[] getOrderBy()
IQueryOptions
ISortOrder
s describing the sort order that
will be imposed on the generated solutions when the rule is evaluated as
a query.getOrderBy
in interface IQueryOptions
ISortOrder
s -or- null
iff
there is no "order by" constraint.public final ISlice getSlice()
IQueryOptions
ISlice
describing a constraint on the first
solution and the maximum #of solutions to be materialized by a
query.
Note: Using an ISlice
requires that the solutions are stable
for queries against the same commit point of the database.
getSlice
in interface IQueryOptions
ISlice
-or- null
if there is no
constraint on the solutions that will be visited.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.