public class Create extends AbstractCreateStatement<Create>
Modifier and Type | Class and Description |
---|---|
static class |
Create.Options
The table options of a CREATE TABLE statement.
|
ifNotExists, keyspaceName, simpleColumns
idempotent, NULL_PAYLOAD_VALUE
Modifier and Type | Method and Description |
---|---|
Create |
addClusteringColumn(String columnName,
DataType dataType)
Add a clustering column definition to this CREATE TABLE statement.
|
Create |
addPartitionKey(String columnName,
DataType dataType)
Add a partition key column definition to this CREATE TABLE statement.
|
Create |
addStaticColumn(String columnName,
DataType dataType)
Add a static column definition to this CREATE TABLE statement.
|
Create |
addUDTClusteringColumn(String columnName,
UDTType udtType)
Add a clustering column definition to this CREATE TABLE statement, when its type contains a UDT.
|
Create |
addUDTPartitionKey(String columnName,
UDTType udtType)
Add a partition key column definition to this CREATE TABLE statement, when its type contains a UDT.
|
Create |
addUDTStaticColumn(String columnName,
UDTType udtType)
Add a static column definition to this CREATE TABLE statement, when its type contains a UDT.
|
String |
buildInternal() |
Create.Options |
withOptions()
Add options for this CREATE TABLE statement.
|
addColumn, addUDTColumn, addUDTListColumn, addUDTMapColumn, addUDTMapColumn, addUDTMapColumn, addUDTSetColumn, buildColumnType, ifNotExists
getKeyspace, getNamedValues, getQueryString, getRoutingKey, getValues, hasValues, usesNamedValues
getQueryString, hasValues, toString
disableTracing, enableTracing, getConsistencyLevel, getDefaultTimestamp, getFetchSize, getOutgoingPayload, getReadTimeoutMillis, getRetryPolicy, getSerialConsistencyLevel, isIdempotent, isTracing, setConsistencyLevel, setDefaultTimestamp, setFetchSize, setIdempotent, setOutgoingPayload, setPagingState, setPagingState, setPagingStateUnsafe, setReadTimeoutMillis, setRetryPolicy, setSerialConsistencyLevel
public Create addPartitionKey(String columnName, DataType dataType)
addColumn
call).
Partition key columns are added in the order of their declaration.columnName
- the name of the partition key column to be added.dataType
- the data type of the partition key column to be added.public Create addUDTPartitionKey(String columnName, UDTType udtType)
addColumn
call).
Partition key columns are added in the order of their declaration.columnName
- the name of the partition key column to be added.udtType
- the UDT type of the partition key column to be added. Use SchemaBuilder.frozen(String)
or SchemaBuilder.udtLiteral(String)
.public Create addClusteringColumn(String columnName, DataType dataType)
addColumn
call).
Clustering columns are added in the order of their declaration.columnName
- the name of the clustering column to be added.dataType
- the data type of the clustering column to be added.public Create addUDTClusteringColumn(String columnName, UDTType udtType)
addColumn
call).
Clustering columns are added in the order of their declaration.columnName
- the name of the clustering column to be added.udtType
- the UDT type of the clustering column to be added. Use SchemaBuilder.frozen(String)
or SchemaBuilder.udtLiteral(String)
.public Create addStaticColumn(String columnName, DataType dataType)
columnName
- the name of the column to be added.dataType
- the data type of the column to be added.public Create addUDTStaticColumn(String columnName, UDTType udtType)
columnName
- the name of the column to be added.udtType
- the UDT type of the column to be added. Use SchemaBuilder.frozen(String)
or SchemaBuilder.udtLiteral(String)
.public Create.Options withOptions()
public String buildInternal()