Package | Description |
---|---|
com.datastax.oss.driver.api.querybuilder | |
com.datastax.oss.driver.api.querybuilder.delete | |
com.datastax.oss.driver.api.querybuilder.select |
Modifier and Type | Interface and Description |
---|---|
interface |
Literal
A value that will be appended as a CQL literal.
|
interface |
Raw
A raw CQL snippet that will be appended to the query as-is, without any syntax checking or
escaping.
|
Modifier and Type | Method and Description |
---|---|
DeleteSelection |
DeleteSelection.selector(Selector selector)
Adds a selector.
|
default DeleteSelection |
DeleteSelection.selectors(Selector... additionalSelectors)
Var-arg equivalent of
DeleteSelection.selectors(Iterable) . |
Modifier and Type | Method and Description |
---|---|
DeleteSelection |
DeleteSelection.selectors(Iterable<Selector> additionalSelectors)
Adds multiple selectors at once.
|
Modifier and Type | Method and Description |
---|---|
static Selector |
Selector.add(Selector left,
Selector right)
Selects the sum of two arguments, as in
SELECT col1 + col2 . |
static Selector |
Selector.all()
Selects all columns, as in
SELECT * . |
Selector |
Selector.as(CqlIdentifier alias)
Aliases the selector, as in
SELECT count(*) AS total . |
default Selector |
Selector.as(String alias)
Shortcut for
as(CqlIdentifier.fromCql(alias)) |
static Selector |
Selector.cast(Selector selector,
DataType targetType)
Casts a selector to a type, as in
SELECT CAST(a AS double) . |
static Selector |
Selector.column(CqlIdentifier columnId)
Selects a particular column by its CQL identifier.
|
static Selector |
Selector.column(String columnName)
Shortcut for
column(CqlIdentifier.fromCql(columnName)) |
static Selector |
Selector.countAll()
Selects the count of all returned rows, as in
SELECT count(*) . |
static Selector |
Selector.divide(Selector left,
Selector right)
Selects the quotient of two arguments, as in
SELECT col1 / col2 . |
static Selector |
Selector.element(CqlIdentifier collectionId,
Term index)
Shortcut for element selection when the target collection is a simple column.
|
static Selector |
Selector.element(Selector collection,
Term index)
Selects an element in a collection column, as in
SELECT m['key'] . |
static Selector |
Selector.element(String collectionName,
Term index)
Shortcut for
element(CqlIdentifier.fromCql(collectionName), index) . |
static Selector |
Selector.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).
|
static Selector |
Selector.field(Selector udt,
CqlIdentifier fieldId)
Selects a field inside of a UDT column, as in
SELECT user.name . |
static Selector |
Selector.field(Selector udt,
String fieldName)
Shortcut for
getUdtField(udt,
CqlIdentifier.fromCql(fieldName)) . |
static Selector |
Selector.field(String udtColumnName,
String fieldName)
|
static Selector |
Selector.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT ks.f(a,b) |
static Selector |
Selector.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
function(CqlIdentifier, CqlIdentifier, Iterable) . |
static Selector |
Selector.function(CqlIdentifier functionId,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT f(a,b) |
static Selector |
Selector.function(CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
function(CqlIdentifier, Iterable) . |
static Selector |
Selector.function(String functionName,
Iterable<Selector> arguments)
Shortcut for
function(CqlIdentifier.fromCql(functionName), arguments) . |
static Selector |
Selector.function(String functionName,
Selector... arguments)
Var-arg equivalent of
function(String, Iterable) . |
static Selector |
Selector.function(String keyspaceName,
String functionName,
Iterable<Selector> arguments)
Shortcut for
function(CqlIdentifier, CqlIdentifier, Iterable)
function(CqlIdentifier.fromCql(functionName), arguments)}. |
static Selector |
Selector.function(String keyspaceName,
String functionName,
Selector... arguments)
Var-arg equivalent of
function(String, String, Iterable) . |
static Selector |
Selector.listOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a list, as in
SELECT [a,b,c] . |
static Selector |
Selector.listOf(Selector... elementSelectors)
Var-arg equivalent of
listOf(Iterable) . |
static Selector |
Selector.mapOf(Map<Selector,Selector> elementSelectors)
Selects a group of elements as a map, as in
SELECT {a:b,c:d} . |
static Selector |
Selector.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} . |
static Selector |
Selector.multiply(Selector left,
Selector right)
Selects the product of two arguments, as in
SELECT col1 * col2 . |
static Selector |
Selector.negate(Selector argument)
Selects the opposite of an argument, as in
SELECT -col1 . |
static Selector |
Selector.range(CqlIdentifier collectionId,
Term left,
Term right)
Shortcut for slice selection when the target collection is a simple column.
|
static Selector |
Selector.range(Selector collection,
Term left,
Term right)
Selects a slice in a collection column, as in
SELECT s[4..8] . |
static Selector |
Selector.range(String collectionName,
Term left,
Term right)
|
static Selector |
Selector.remainder(Selector left,
Selector right)
Selects the remainder of two arguments, as in
SELECT col1 % col2 . |
static Selector |
Selector.setOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a set, as in
SELECT {a,b,c} . |
static Selector |
Selector.setOf(Selector... elementSelectors)
Var-arg equivalent of
setOf(Iterable) . |
static Selector |
Selector.subtract(Selector left,
Selector right)
Selects the difference of two arguments, as in
SELECT col1 - col2 . |
static Selector |
Selector.toDate(CqlIdentifier columnId)
Shortcut to select the result of the built-in
toDate function on a simple column. |
static Selector |
Selector.toDate(String columnName)
Shortcut for
toDate(CqlIdentifier.fromCql(columnName)) . |
static Selector |
Selector.toTimestamp(CqlIdentifier columnId)
Shortcut to select the result of the built-in
toTimestamp function on a simple column. |
static Selector |
Selector.toTimestamp(String columnName)
Shortcut for
toTimestamp(CqlIdentifier.fromCql(columnName)) . |
static Selector |
Selector.toUnixTimestamp(CqlIdentifier columnId)
Shortcut to select the result of the built-in
toUnixTimestamp function on a simple
column. |
static Selector |
Selector.toUnixTimestamp(String columnName)
Shortcut for
toUnixTimestamp(CqlIdentifier.fromCql(columnName)) . |
static Selector |
Selector.ttl(CqlIdentifier columnId)
Shortcut to select the result of the built-in
ttl function, as in SELECT
ttl(c) . |
static Selector |
Selector.ttl(String columnName)
Shortcut for
ttl(CqlIdentifier.fromCql(columnName)) . |
static Selector |
Selector.tupleOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a tuple, as in
SELECT (a,b,c) . |
static Selector |
Selector.tupleOf(Selector... elementSelectors)
Var-arg equivalent of
tupleOf(Iterable) . |
static Selector |
Selector.typeHint(Selector selector,
DataType targetType)
Provides a type hint for a selector, as in
SELECT (double)1/3 . |
static Selector |
Selector.writeTime(CqlIdentifier columnId)
Shortcut to select the result of the built-in
writetime function, as in SELECT
writetime(c) . |
static Selector |
Selector.writeTime(String columnName)
Shortcut for
writeTime(CqlIdentifier.fromCql(columnName)) . |
Modifier and Type | Method and Description |
---|---|
static Selector |
Selector.add(Selector left,
Selector right)
Selects the sum of two arguments, as in
SELECT col1 + col2 . |
default Select |
OngoingSelection.add(Selector left,
Selector right)
Selects the sum of two arguments, as in
SELECT col1 + col2 . |
static Selector |
Selector.cast(Selector selector,
DataType targetType)
Casts a selector to a type, as in
SELECT CAST(a AS double) . |
default Select |
OngoingSelection.cast(Selector selector,
DataType targetType)
Casts a selector to a type, as in
SELECT CAST(a AS double) . |
static Selector |
Selector.divide(Selector left,
Selector right)
Selects the quotient of two arguments, as in
SELECT col1 / col2 . |
default Select |
OngoingSelection.divide(Selector left,
Selector right)
Selects the quotient of two arguments, as in
SELECT col1 / col2 . |
static Selector |
Selector.element(Selector collection,
Term index)
Selects an element in a collection column, as in
SELECT m['key'] . |
default Select |
OngoingSelection.element(Selector collection,
Term index)
Selects an element in a collection column, as in
SELECT m['key'] . |
static Selector |
Selector.field(Selector udt,
CqlIdentifier fieldId)
Selects a field inside of a UDT column, as in
SELECT user.name . |
default Select |
OngoingSelection.field(Selector udt,
CqlIdentifier fieldId)
Selects a field inside of a UDT column, as in
SELECT user.name . |
static Selector |
Selector.field(Selector udt,
String fieldName)
Shortcut for
getUdtField(udt,
CqlIdentifier.fromCql(fieldName)) . |
default Select |
OngoingSelection.field(Selector udt,
String fieldName)
Shortcut for
field(udt,
CqlIdentifier.fromCql(fieldName)) . |
static Selector |
Selector.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
function(CqlIdentifier, CqlIdentifier, Iterable) . |
default Select |
OngoingSelection.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(CqlIdentifier,CqlIdentifier, Iterable) . |
static Selector |
Selector.function(CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
function(CqlIdentifier, Iterable) . |
default Select |
OngoingSelection.function(CqlIdentifier functionId,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(CqlIdentifier, Iterable) . |
static Selector |
Selector.function(String functionName,
Selector... arguments)
Var-arg equivalent of
function(String, Iterable) . |
default Select |
OngoingSelection.function(String functionName,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(String, Iterable) . |
static Selector |
Selector.function(String keyspaceName,
String functionName,
Selector... arguments)
Var-arg equivalent of
function(String, String, Iterable) . |
default Select |
OngoingSelection.function(String keyspaceName,
String functionName,
Selector... arguments)
Var-arg equivalent of
OngoingSelection.function(String, String, Iterable) . |
default Select |
Select.groupBy(Selector... selectors)
Var-arg equivalent of
Select.groupBy(Iterable) . |
Select |
Select.groupBy(Selector selector)
Adds the provided GROUP BY clause to the query.
|
static Selector |
Selector.listOf(Selector... elementSelectors)
Var-arg equivalent of
listOf(Iterable) . |
default Select |
OngoingSelection.listOf(Selector... elementSelectors)
Var-arg equivalent of
OngoingSelection.listOf(Iterable) . |
static Selector |
Selector.multiply(Selector left,
Selector right)
Selects the product of two arguments, as in
SELECT col1 * col2 . |
default Select |
OngoingSelection.multiply(Selector left,
Selector right)
Selects the product of two arguments, as in
SELECT col1 * col2 . |
static Selector |
Selector.negate(Selector argument)
Selects the opposite of an argument, as in
SELECT -col1 . |
default Select |
OngoingSelection.negate(Selector argument)
Selects the opposite of an argument, as in
SELECT -col1 . |
static Selector |
Selector.range(Selector collection,
Term left,
Term right)
Selects a slice in a collection column, as in
SELECT s[4..8] . |
default Select |
OngoingSelection.range(Selector collection,
Term left,
Term right)
Selects a slice in a collection column, as in
SELECT s[4..8] . |
static Selector |
Selector.remainder(Selector left,
Selector right)
Selects the remainder of two arguments, as in
SELECT col1 % col2 . |
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.
|
default Select |
OngoingSelection.selectors(Selector... additionalSelectors)
Var-arg equivalent of
OngoingSelection.selectors(Iterable) . |
static Selector |
Selector.setOf(Selector... elementSelectors)
Var-arg equivalent of
setOf(Iterable) . |
default Select |
OngoingSelection.setOf(Selector... elementSelectors)
Var-arg equivalent of
OngoingSelection.setOf(Iterable) . |
static Selector |
Selector.subtract(Selector left,
Selector right)
Selects the difference of two arguments, as in
SELECT col1 - col2 . |
default Select |
OngoingSelection.subtract(Selector left,
Selector right)
Selects the difference of two terms, as in
SELECT col1 - col2 . |
static Selector |
Selector.tupleOf(Selector... elementSelectors)
Var-arg equivalent of
tupleOf(Iterable) . |
default Select |
OngoingSelection.tupleOf(Selector... elementSelectors)
Var-arg equivalent of
OngoingSelection.tupleOf(Iterable) . |
static Selector |
Selector.typeHint(Selector selector,
DataType targetType)
Provides a type hint for a selector, as in
SELECT (double)1/3 . |
default Select |
OngoingSelection.typeHint(Selector selector,
DataType targetType)
Provides a type hint for a selector, as in
SELECT (double)1/3 . |
Modifier and Type | Method and Description |
---|---|
static Selector |
Selector.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT ks.f(a,b) |
default Select |
OngoingSelection.function(CqlIdentifier keyspaceId,
CqlIdentifier functionId,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT f(a,b) |
static Selector |
Selector.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,
Iterable<Selector> arguments)
Selects the result of a function call, as is
SELECT f(a,b) |
static Selector |
Selector.function(String functionName,
Iterable<Selector> arguments)
Shortcut for
function(CqlIdentifier.fromCql(functionName), arguments) . |
default Select |
OngoingSelection.function(String functionName,
Iterable<Selector> arguments)
Shortcut for
function(CqlIdentifier.fromCql(functionName), arguments) . |
static Selector |
Selector.function(String keyspaceName,
String functionName,
Iterable<Selector> arguments)
Shortcut for
function(CqlIdentifier, CqlIdentifier, Iterable)
function(CqlIdentifier.fromCql(functionName), arguments)}. |
default Select |
OngoingSelection.function(String keyspaceName,
String functionName,
Iterable<Selector> arguments)
|
Select |
Select.groupBy(Iterable<Selector> selectors)
Adds the provided GROUP BY clauses to the query.
|
static Selector |
Selector.listOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a list, as in
SELECT [a,b,c] . |
default Select |
OngoingSelection.listOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a list, as in
SELECT [a,b,c] . |
static Selector |
Selector.mapOf(Map<Selector,Selector> elementSelectors)
Selects a group of elements as a map, as in
SELECT {a:b,c:d} . |
static Selector |
Selector.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)
Selects a group of elements as a map, as in
SELECT {a:b,c:d} . |
default Select |
OngoingSelection.mapOf(Map<Selector,Selector> elementSelectors)
Selects a group of elements as a map, as in
SELECT {a:b,c:d} . |
static Selector |
Selector.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} . |
static Selector |
Selector.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.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.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} . |
Select |
OngoingSelection.selectors(Iterable<Selector> additionalSelectors)
Adds multiple selectors at once.
|
static Selector |
Selector.setOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a set, as in
SELECT {a,b,c} . |
default Select |
OngoingSelection.setOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a set, as in
SELECT {a,b,c} . |
static Selector |
Selector.tupleOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a tuple, as in
SELECT (a,b,c) . |
default Select |
OngoingSelection.tupleOf(Iterable<Selector> elementSelectors)
Selects a group of elements as a tuple, as in
SELECT (a,b,c) . |
Copyright © 2017–2022. All rights reserved.