Class AlterTableSpecification
java.lang.Object
org.springframework.data.cassandra.core.cql.keyspace.TableNameSpecification
org.springframework.data.cassandra.core.cql.keyspace.TableOptionsSpecification<AlterTableSpecification>
org.springframework.data.cassandra.core.cql.keyspace.AlterTableSpecification
Object to configure a
ALTER TABLE
specification.- Author:
- Matthew T. Adams, Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionadd
(com.datastax.oss.driver.api.core.CqlIdentifier column, com.datastax.oss.driver.api.core.type.DataType type) Adds anADD
to the list of column changes.Adds anADD
to the list of column changes.alter
(com.datastax.oss.driver.api.core.CqlIdentifier column, com.datastax.oss.driver.api.core.type.DataType type) Adds an ALTER to the list of column changes.Adds an ALTER to the list of column changes.static AlterTableSpecification
alterTable
(com.datastax.oss.driver.api.core.CqlIdentifier tableName) Entry point into theAlterTableSpecification
's fluent API giventableName
to alter a table.static AlterTableSpecification
alterTable
(String tableName) Entry point into theAlterTableSpecification
's fluent API giventableName
to alter a table.drop
(com.datastax.oss.driver.api.core.CqlIdentifier column) Returns an unmodifiable list of column changes.rename
(com.datastax.oss.driver.api.core.CqlIdentifier from, com.datastax.oss.driver.api.core.CqlIdentifier to) Adds aRENAME
to the list of column changes.Adds aRENAME
to the list of column changes.Methods inherited from class org.springframework.data.cassandra.core.cql.keyspace.TableOptionsSpecification
getOptions, with, with, with
Methods inherited from class org.springframework.data.cassandra.core.cql.keyspace.TableNameSpecification
getName
-
Method Details
-
alterTable
Entry point into theAlterTableSpecification
's fluent API giventableName
to alter a table. Convenient if imported statically.- Parameters:
tableName
- must not be null or empty.- Returns:
- a new
AlterTableSpecification
.
-
alterTable
public static AlterTableSpecification alterTable(com.datastax.oss.driver.api.core.CqlIdentifier tableName) Entry point into theAlterTableSpecification
's fluent API giventableName
to alter a table. Convenient if imported statically.- Parameters:
tableName
- must not be null.- Returns:
- a new
AlterTableSpecification
.
-
add
public AlterTableSpecification add(String column, com.datastax.oss.driver.api.core.type.DataType type) Adds anADD
to the list of column changes.- Parameters:
column
- must not be null or empty.type
- must not be null.- Returns:
- this
AlterTableSpecification
.
-
add
public AlterTableSpecification add(com.datastax.oss.driver.api.core.CqlIdentifier column, com.datastax.oss.driver.api.core.type.DataType type) Adds anADD
to the list of column changes.- Parameters:
column
- must not be null.type
- must not be null.- Returns:
- this
AlterTableSpecification
. - Since:
- 2.0
-
drop
-
drop
-
rename
Adds aRENAME
to the list of column changes.- Parameters:
from
- must not be null or empty.to
- must not be null or empty.- Returns:
- this
AlterTableSpecification
.
-
rename
public AlterTableSpecification rename(com.datastax.oss.driver.api.core.CqlIdentifier from, com.datastax.oss.driver.api.core.CqlIdentifier to) Adds aRENAME
to the list of column changes.- Parameters:
from
- must not be null.to
- must not be null.- Returns:
- this
AlterTableSpecification
. - Since:
- 2.0
-
alter
public AlterTableSpecification alter(String column, com.datastax.oss.driver.api.core.type.DataType type) Adds an ALTER to the list of column changes.- Parameters:
column
- must not be null or emptytype
- must not be null- Returns:
- this
AlterTableSpecification
.
-
alter
public AlterTableSpecification alter(com.datastax.oss.driver.api.core.CqlIdentifier column, com.datastax.oss.driver.api.core.type.DataType type) Adds an ALTER to the list of column changes.- Parameters:
column
- must not be null.type
- must not be null.- Returns:
- this
AlterTableSpecification
. - Since:
- 2.0
-
getChanges
Returns an unmodifiable list of column changes.
-