Class Select.Builder
- java.lang.Object
-
- com.datastax.driver.core.querybuilder.Select.Builder
-
- Direct Known Subclasses:
Select.Selection
- Enclosing class:
- Select
public static class Select.Builder extends Object
An in-construction SELECT statement.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Select.Builderdistinct()Uses DISTINCT selection.Selectfrom(MaterializedViewMetadata view)Adds the materialized view to select from.Selectfrom(TableMetadata table)Adds the table to select from.Selectfrom(String table)Adds the table to select from.Selectfrom(String keyspace, String table)Adds the table to select from.Select.Builderjson()Uses JSON selection.
-
-
-
Method Detail
-
distinct
public Select.Builder distinct()
Uses DISTINCT selection.- Returns:
- this in-build SELECT statement.
-
json
public Select.Builder json()
Uses JSON selection.Cassandra 2.2 introduced JSON support to SELECT statements: the
JSONkeyword can be used to return each row as a single JSON encoded map.- Returns:
- this in-build SELECT statement.
- See Also:
- JSON Support for CQL, JSON Support in Cassandra 2.2, Data retrieval using JSON
-
from
public Select from(String table)
Adds the table to select from.- Parameters:
table- the name of the table to select from.- Returns:
- a newly built SELECT statement that selects from
table.
-
from
public Select from(String keyspace, String table)
Adds the table to select from.- Parameters:
keyspace- the name of the keyspace to select from.table- the name of the table to select from.- Returns:
- a newly built SELECT statement that selects from
keyspace.table.
-
from
public Select from(TableMetadata table)
Adds the table to select from.- Parameters:
table- the table to select from.- Returns:
- a newly built SELECT statement that selects from
table.
-
from
public Select from(MaterializedViewMetadata view)
Adds the materialized view to select from.- Parameters:
view- the materialized view to select from.- Returns:
- a newly built SELECT statement that selects from
view.
-
-