public interface Select extends OngoingSelection, OngoingWhereClause<Select>, BuildableQuery
It knows about the table and at least one selector, and is therefore buildable. Additional selectors and clauses can still be added before building.
Modifier and Type | Method and Description |
---|---|
Select |
allowFiltering()
Adds an ALLOW FILTERING clause to this query.
|
default Select |
groupBy(CqlIdentifier columnId)
Shortcut for
groupBy(Selector.column(columnId)) . |
Select |
groupBy(Iterable<Selector> selectors)
Adds the provided GROUP BY clauses to the query.
|
default Select |
groupBy(Selector... selectors)
Var-arg equivalent of
groupBy(Iterable) . |
Select |
groupBy(Selector selector)
Adds the provided GROUP BY clause to the query.
|
default Select |
groupBy(String columnName)
Shortcut for
groupBy(Selector.column(columnName)) . |
default Select |
groupByColumnIds(CqlIdentifier... columnIds)
Var-arg equivalent of
groupByColumnIds(Iterable) . |
default Select |
groupByColumnIds(Iterable<CqlIdentifier> columnIds)
Shortcut for
groupBy(Iterable) where all the clauses are simple columns. |
default Select |
groupByColumns(Iterable<String> columnNames)
Shortcut for
groupBy(Iterable) where all the clauses are simple columns. |
default Select |
groupByColumns(String... columnNames)
Var-arg equivalent of
groupByColumns(Iterable) . |
Select |
limit(BindMarker bindMarker)
Adds a LIMIT clause to this query with a bind marker.
|
Select |
limit(int limit)
Adds a LIMIT clause to this query with a literal value.
|
Select |
orderBy(CqlIdentifier columnId,
ClusteringOrder order)
Adds the provided ORDER BY clause to the query.
|
default Select |
orderBy(Map<String,ClusteringOrder> orderings)
Shortcut for
orderByIds(Map) with the columns specified as case-insensitive names. |
default Select |
orderBy(String columnName,
ClusteringOrder order)
Shortcut for
orderBy(CqlIdentifier.fromCql(columnName), order) . |
Select |
orderByIds(Map<CqlIdentifier,ClusteringOrder> orderings)
Adds the provided ORDER BY clauses to the query.
|
Select |
perPartitionLimit(BindMarker bindMarker)
Adds a PER PARTITION LIMIT clause to this query with a bind marker.
|
Select |
perPartitionLimit(int limit)
Adds a PER PARTITION LIMIT clause to this query with a literal value.
|
add, all, as, as, cast, column, column, columns, columns, columns, columnsIds, countAll, divide, element, element, element, field, field, field, field, function, function, function, function, function, function, function, function, listOf, listOf, literal, literal, literal, mapOf, mapOf, multiply, negate, range, range, range, raw, remainder, selector, selectors, selectors, setOf, setOf, subtract, toDate, toDate, toTimestamp, toTimestamp, toUnixTimestamp, toUnixTimestamp, ttl, ttl, tupleOf, tupleOf, typeHint, writeTime, writeTime
where, where, where, whereColumn, whereColumn, whereColumnIds, whereColumns, whereColumns, whereColumns, whereCustomIndex, whereCustomIndex, whereMapValue, whereMapValue, whereRaw, whereToken, whereToken, whereToken, whereTokenFromIds
@NonNull Select groupBy(@NonNull Iterable<Selector> selectors)
As of version 4.0, Apache Cassandra only allows grouping by columns, therefore you can use
the shortcuts groupByColumns(Iterable)
or groupByColumnIds(Iterable)
.
@NonNull default Select groupBy(@NonNull Selector... selectors)
groupBy(Iterable)
.@NonNull default Select groupByColumnIds(@NonNull Iterable<CqlIdentifier> columnIds)
groupBy(Iterable)
where all the clauses are simple columns. The arguments
are wrapped with Selector.column(CqlIdentifier)
.@NonNull default Select groupByColumnIds(@NonNull CqlIdentifier... columnIds)
groupByColumnIds(Iterable)
.@NonNull default Select groupByColumns(@NonNull Iterable<String> columnNames)
groupBy(Iterable)
where all the clauses are simple columns. The arguments
are wrapped with Selector.column(String)
.@NonNull default Select groupByColumns(@NonNull String... columnNames)
groupByColumns(Iterable)
.@NonNull Select groupBy(@NonNull Selector selector)
As of version 4.0, Apache Cassandra only allows grouping by columns, therefore you can use
the shortcuts groupBy(String)
or groupBy(CqlIdentifier)
.
@NonNull default Select groupBy(@NonNull CqlIdentifier columnId)
groupBy(Selector.column(columnId))
.@NonNull default Select groupBy(@NonNull String columnName)
groupBy(Selector.column(columnName))
.@NonNull Select orderByIds(@NonNull Map<CqlIdentifier,ClusteringOrder> orderings)
They will be appended in the iteration order of the provided map. If an ordering was already defined for a given identifier, it will be removed and the new ordering will appear in its position in the provided map.
@NonNull default Select orderBy(@NonNull Map<String,ClusteringOrder> orderings)
orderByIds(Map)
with the columns specified as case-insensitive names.
They will be wrapped with CqlIdentifier.fromCql(String)
.
Note that it's possible for two different case-insensitive names to resolve to the same identifier, for example "foo" and "Foo"; if this happens, a runtime exception will be thrown.
IllegalArgumentException
- if two names resolve to the same identifier.@NonNull Select orderBy(@NonNull CqlIdentifier columnId, @NonNull ClusteringOrder order)
If an ordering was already defined for this identifier, it will be removed and the new clause will be appended at the end of the current list for this query.
@NonNull default Select orderBy(@NonNull String columnName, @NonNull ClusteringOrder order)
orderBy(CqlIdentifier.fromCql(columnName), order)
.@NonNull Select limit(int limit)
If this method or limit(BindMarker)
is called multiple times, the last value is
used.
@NonNull Select limit(@Nullable BindMarker bindMarker)
To create the argument, use one of the factory methods in QueryBuilder
, for example
bindMarker()
.
If this method or limit(int)
is called multiple times, the last value is used.
null
can be passed to cancel a previous limit.
@NonNull Select perPartitionLimit(int limit)
If this method or perPartitionLimit(BindMarker)
is called multiple times, the last
value is used.
@NonNull Select perPartitionLimit(@Nullable BindMarker bindMarker)
To create the argument, use one of the factory methods in QueryBuilder
, for example
bindMarker()
.
If this method or perPartitionLimit(int)
is called multiple times, the last value
is used. null
can be passed to cancel a previous limit.
@NonNull Select allowFiltering()
This method is idempotent, calling it multiple times will only add a single clause.
Copyright © 2017–2022. All rights reserved.