Package | Description |
---|---|
com.datastax.oss.driver.api.querybuilder.select |
Modifier and Type | Method and Description |
---|---|
default Select |
OngoingSelection.add(Selector left,
Selector right)
Selects the sum of two arguments, as in
SELECT col1 + col2 . |
default Select |
OngoingSelection.all()
Selects all columns, as in
SELECT * . |
Select |
Select.allowFiltering()
Adds an ALLOW FILTERING clause to this query.
|
Select |
OngoingSelection.as(CqlIdentifier alias)
Aliases the last added selector, as in
SELECT count(*) AS total . |
default Select |
OngoingSelection.as(String alias)
Shortcut for
as(CqlIdentifier.fromCql(alias)) |
default Select |
OngoingSelection.cast(Selector selector,
DataType targetType)
Casts a selector to a type, as in
SELECT CAST(a AS double) . |
default Select |
OngoingSelection.column(CqlIdentifier columnId)
Selects a particular column by its CQL identifier.
|
default Select |
OngoingSelection.column(String columnName)
Shortcut for
column(CqlIdentifier.fromCql(columnName)) |
default Select |
OngoingSelection.columns(CqlIdentifier... columnIds)
Var-arg equivalent of
OngoingSelection.columnsIds(Iterable) . |
default Select |
OngoingSelection.columns(Iterable<String> columnNames)
Convenience method to select multiple simple columns at once, as in
SELECT a,b,c . |
default Select |
OngoingSelection.columns(String... columnNames)
Var-arg equivalent of
OngoingSelection.columns(Iterable) . |
default Select |
OngoingSelection.columnsIds(Iterable<CqlIdentifier> columnIds)
Convenience method to select multiple simple columns at once, as in
SELECT a,b,c . |
default Select |
OngoingSelection.countAll()
Selects the count of all returned rows, as in
SELECT count(*) . |
default Select |
OngoingSelection.divide(Selector left,
Selector right)
Selects the quotient of two arguments, as in
SELECT col1 / col2 . |
default Select |
OngoingSelection.element(CqlIdentifier collectionId,
Term index)
Shortcut for element selection when the target collection is a simple column.
|
default Select |
OngoingSelection.element(Selector collection,
Term index)
Selects an element in a collection column, as in
SELECT m['key'] . |
default Select |
OngoingSelection.element(String collectionName,
Term index)
Shortcut for
element(CqlIdentifier.fromCql(collectionName), index) . |
default Select |
OngoingSelection.field(CqlIdentifier udtColumnId,
CqlIdentifier fieldId)
Shortcut to select a UDT field when the UDT is a simple column (as opposed to a more complex
selection, like a nested UDT).
|
default Select |
OngoingSelection.field(Selector udt,
CqlIdentifier fieldId)
Selects a field inside of a UDT column, as in
SELECT user.name . |
default Select |
OngoingSelection.field(Selector udt,
String fieldName)
Shortcut for
field(udt,
CqlIdentifier.fromCql(fieldName)) . |
default Select |
OngoingSelection.field(String udtColumnName,
String fieldName)
|
default Select |
OngoingSelection.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT f(a,b) |
default Select |
OngoingSelection.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(CqlIdentifier,CqlIdentifier, Iterable) . |
default Select |
OngoingSelection.function(CqlIdentifier functionId,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT f(a,b) |
default Select |
OngoingSelection.function(CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(CqlIdentifier, Iterable) . |
default Select |
OngoingSelection.function(String functionName,
Iterable<Selector> arguments)
Shortcut for
function(CqlIdentifier.fromCql(functionName), arguments) . |
default Select |
OngoingSelection.function(String functionName,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(String, Iterable) . |
default Select |
OngoingSelection.function(String keyspaceName,
String functionName,
Iterable<Selector> arguments)
|
default Select |
OngoingSelection.function(String keyspaceName,
String functionName,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(String, String, Iterable) . |
default Select |
Select.groupBy(CqlIdentifier columnId)
Shortcut for
groupBy(Selector.column(columnId)) . |
Select |
Select.groupBy(Iterable<Selector> selectors)
Adds the provided GROUP BY clauses to the query.
|
default Select |
Select.groupBy(Selector... selectors)
Var-arg equivalent of
groupBy(Iterable) . |
Select |
Select.groupBy(Selector selector)
Adds the provided GROUP BY clause to the query.
|
default Select |
Select.groupBy(String columnName)
Shortcut for
groupBy(Selector.column(columnName)) . |
default Select |
Select.groupByColumnIds(CqlIdentifier... columnIds)
Var-arg equivalent of
groupByColumnIds(Iterable) . |
default Select |
Select.groupByColumnIds(Iterable<CqlIdentifier> columnIds)
Shortcut for
groupBy(Iterable) where all the clauses are simple columns. |
default Select |
Select.groupByColumns(Iterable<String> columnNames)
Shortcut for
groupBy(Iterable) where all the clauses are simple columns. |
default Select |
Select.groupByColumns(String... columnNames)
Var-arg equivalent of
groupByColumns(Iterable) . |
Select |
Select.limit(BindMarker bindMarker)
Adds a LIMIT clause to this query with a bind marker.
|
Select |
Select.limit(int limit)
Adds a LIMIT clause to this query with a literal value.
|
default Select |
OngoingSelection.listOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a list, as in
SELECT [a,b,c] . |
default Select |
OngoingSelection.listOf(Selector... elementSelectors)
Var-arg equivalent of
OngoingSelection.listOf(Iterable) . |
default Select |
OngoingSelection.literal(Object value)
Selects literal value, as in
WHERE k = 1 . |
default Select |
OngoingSelection.literal(Object value,
CodecRegistry codecRegistry)
Selects a literal value, as in
WHERE k = 1 . |
default <T> Select |
OngoingSelection.literal(T value,
TypeCodec<T> codec)
Selects a literal value, as in
WHERE k = 1 . |
default Select |
OngoingSelection.mapOf(Map<Selector,Selector> elementSelectors)
Selects a group of elements as a map, as in
SELECT {a:b,c:d} . |
default Select |
OngoingSelection.mapOf(Map<Selector,Selector> elementSelectors,
DataType keyType,
DataType valueType)
Selects a group of elements as a map and force the resulting map type, as in
SELECT
(map<int,text>){a:b,c:d} . |
default Select |
OngoingSelection.multiply(Selector left,
Selector right)
Selects the product of two arguments, as in
SELECT col1 * col2 . |
default Select |
OngoingSelection.negate(Selector argument)
Selects the opposite of an argument, as in
SELECT -col1 . |
Select |
Select.orderBy(CqlIdentifier columnId,
ClusteringOrder order)
Adds the provided ORDER BY clause to the query.
|
default Select |
Select.orderBy(Map<String,ClusteringOrder> orderings)
Shortcut for
orderByIds(Map) with the columns specified as case-insensitive names. |
default Select |
Select.orderBy(String columnName,
ClusteringOrder order)
Shortcut for
orderBy(CqlIdentifier.fromCql(columnName), order) . |
Select |
Select.orderByIds(Map<CqlIdentifier,ClusteringOrder> orderings)
Adds the provided ORDER BY clauses to the query.
|
Select |
Select.perPartitionLimit(BindMarker bindMarker)
Adds a PER PARTITION LIMIT clause to this query with a bind marker.
|
Select |
Select.perPartitionLimit(int limit)
Adds a PER PARTITION LIMIT clause to this query with a literal value.
|
default Select |
OngoingSelection.range(CqlIdentifier collectionId,
Term left,
Term right)
Shortcut for slice selection when the target collection is a simple column.
|
default Select |
OngoingSelection.range(Selector collection,
Term left,
Term right)
Selects a slice in a collection column, as in
SELECT s[4..8] . |
default Select |
OngoingSelection.range(String collectionName,
Term left,
Term right)
|
default Select |
OngoingSelection.raw(String rawExpression)
Selects an arbitrary expression expressed as a raw string.
|
default Select |
OngoingSelection.remainder(Selector left,
Selector right)
Selects the remainder of two arguments, as in
SELECT col1 % col2 . |
Select |
OngoingSelection.selector(Selector selector)
Adds a selector.
|
Select |
OngoingSelection.selectors(Iterable<Selector> additionalSelectors)
Adds multiple selectors at once.
|
default Select |
OngoingSelection.selectors(Selector... additionalSelectors)
Var-arg equivalent of
OngoingSelection.selectors(Iterable) . |
default Select |
OngoingSelection.setOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a set, as in
SELECT {a,b,c} . |
default Select |
OngoingSelection.setOf(Selector... elementSelectors)
Var-arg equivalent of
OngoingSelection.setOf(Iterable) . |
default Select |
OngoingSelection.subtract(Selector left,
Selector right)
Selects the difference of two terms, as in
SELECT col1 - col2 . |
default Select |
OngoingSelection.toDate(CqlIdentifier columnId)
Shortcut to select the result of the built-in
toDate function. |
default Select |
OngoingSelection.toDate(String columnName)
Shortcut for
toDate(CqlIdentifier.fromCql(columnName)) . |
default Select |
OngoingSelection.toTimestamp(CqlIdentifier columnId)
Shortcut to select the result of the built-in
toTimestamp function. |
default Select |
OngoingSelection.toTimestamp(String columnName)
Shortcut for
toTimestamp(CqlIdentifier.fromCql(columnName)) . |
default Select |
OngoingSelection.toUnixTimestamp(CqlIdentifier columnId)
Shortcut to select the result of the built-in
toUnixTimestamp function. |
default Select |
OngoingSelection.toUnixTimestamp(String columnName)
Shortcut for
toUnixTimestamp(CqlIdentifier.fromCql(columnName)) . |
default Select |
OngoingSelection.ttl(CqlIdentifier columnId)
Shortcut to select the result of the built-in
ttl function, as in SELECT
ttl(c) . |
default Select |
OngoingSelection.ttl(String columnName)
Shortcut for
ttl(CqlIdentifier.fromCql(columnName)) . |
default Select |
OngoingSelection.tupleOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a tuple, as in
SELECT (a,b,c) . |
default Select |
OngoingSelection.tupleOf(Selector... elementSelectors)
Var-arg equivalent of
OngoingSelection.tupleOf(Iterable) . |
default Select |
OngoingSelection.typeHint(Selector selector,
DataType targetType)
Provides a type hint for a selector, as in
SELECT (double)1/3 . |
default Select |
OngoingSelection.writeTime(CqlIdentifier columnId)
Shortcut to select the result of the built-in
writetime function, as in SELECT
writetime(c) . |
default Select |
OngoingSelection.writeTime(String columnName)
Shortcut for
writeTime(CqlIdentifier.fromCql(columnName)) . |
Copyright © 2017–2019. All rights reserved.