public interface CreateTable extends BuildableQuery, OngoingPartitionKey, CreateTableWithOptions
| Modifier and Type | Method and Description |
|---|---|
CreateTable |
withClusteringColumn(com.datastax.oss.driver.api.core.CqlIdentifier columnName,
com.datastax.oss.driver.api.core.type.DataType dataType)
Adds a clustering column definition in the CREATE TABLE statement.
|
default CreateTable |
withClusteringColumn(String columnName,
com.datastax.oss.driver.api.core.type.DataType dataType)
|
CreateTable |
withColumn(com.datastax.oss.driver.api.core.CqlIdentifier columnName,
com.datastax.oss.driver.api.core.type.DataType dataType)
Adds a column definition in the CREATE TABLE statement.
|
default CreateTable |
withColumn(String columnName,
com.datastax.oss.driver.api.core.type.DataType dataType)
Shortcut for
withColumn(CqlIdentifier.asCql(columnName), dataType). |
CreateTable |
withStaticColumn(com.datastax.oss.driver.api.core.CqlIdentifier columnName,
com.datastax.oss.driver.api.core.type.DataType dataType)
Adds a static column definition in the CREATE TABLE statement.
|
default CreateTable |
withStaticColumn(String columnName,
com.datastax.oss.driver.api.core.type.DataType dataType)
|
withPartitionKey, withPartitionKeywithCompactStorageasCql, build, build, build, builderwithClusteringOrder, withClusteringOrder, withClusteringOrder, withClusteringOrderByIdswithBloomFilterFpChance, withCaching, withCDC, withComment, withCompaction, withCompression, withCompression, withDcLocalReadRepairChance, withDefaultTimeToLiveSeconds, withDeflateCompression, withDeflateCompression, withGcGraceSeconds, withLZ4Compression, withLZ4Compression, withMaxIndexInterval, withMemtableFlushPeriodInMs, withMinIndexInterval, withNoCompression, withReadRepairChance, withSnappyCompression, withSnappyCompression, withSpeculativeRetrygetOptions, withOption@NonNull CreateTable withClusteringColumn(@NonNull com.datastax.oss.driver.api.core.CqlIdentifier columnName, @NonNull com.datastax.oss.driver.api.core.type.DataType dataType)
This includes the column declaration (you don't need an additional addColumn call).
Clustering key columns are added in the order of their declaration.
To create the data type, use the constants and static methods in DataTypes, or
SchemaBuilder.udt(CqlIdentifier, boolean).
@NonNull default CreateTable withClusteringColumn(@NonNull String columnName, @NonNull com.datastax.oss.driver.api.core.type.DataType dataType)
@NonNull CreateTable withColumn(@NonNull com.datastax.oss.driver.api.core.CqlIdentifier columnName, @NonNull com.datastax.oss.driver.api.core.type.DataType dataType)
To create the data type, use the constants and static methods in DataTypes, or
SchemaBuilder.udt(CqlIdentifier, boolean).
@NonNull default CreateTable withColumn(@NonNull String columnName, @NonNull com.datastax.oss.driver.api.core.type.DataType dataType)
withColumn(CqlIdentifier.asCql(columnName), dataType).@NonNull CreateTable withStaticColumn(@NonNull com.datastax.oss.driver.api.core.CqlIdentifier columnName, @NonNull com.datastax.oss.driver.api.core.type.DataType dataType)
This includes the column declaration (you don't need an additional addColumn call).
To create the data type, use the constants and static methods in DataTypes, or
SchemaBuilder.udt(CqlIdentifier, boolean).
@NonNull default CreateTable withStaticColumn(@NonNull String columnName, @NonNull com.datastax.oss.driver.api.core.type.DataType dataType)
Copyright © 2017–2020. All rights reserved.