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
- All Implemented Interfaces:
CqlSpecification
public class AlterTableSpecification
extends TableOptionsSpecification<AlterTableSpecification>
implements CqlSpecification
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 anADDto the list of column changes.Adds anADDto 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 AlterTableSpecificationalterTable(@Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, com.datastax.oss.driver.api.core.CqlIdentifier tableName) Entry point into theAlterTableSpecification's fluent API giventableNameto alter a table.static AlterTableSpecificationalterTable(com.datastax.oss.driver.api.core.CqlIdentifier tableName) Entry point into theAlterTableSpecification's fluent API giventableNameto alter a table.static AlterTableSpecificationalterTable(String tableName) Entry point into theAlterTableSpecification's fluent API giventableNameto 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 aRENAMEto the list of column changes.Adds aRENAMEto the list of column changes.Methods inherited from class TableOptionsSpecification
getOptions, with, with, with, withMethods inherited from class TableNameSpecification
getKeyspace, getName
-
Method Details
-
alterTable
Entry point into theAlterTableSpecification's fluent API giventableNameto 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 giventableNameto alter a table. Convenient if imported statically.- Parameters:
tableName- must not be null.- Returns:
- a new
AlterTableSpecification.
-
alterTable
public static AlterTableSpecification alterTable(@Nullable com.datastax.oss.driver.api.core.CqlIdentifier keyspace, com.datastax.oss.driver.api.core.CqlIdentifier tableName) Entry point into theAlterTableSpecification's fluent API giventableNameto alter a table. Convenient if imported statically. Uses the default keyspace ifkeyspaceis null; otherwise, of thekeyspaceis not null, then the table name is prefixed withkeyspace.- Parameters:
keyspace- can be null.tableName- must not be null.- Returns:
- a new
AlterTableSpecification. - Since:
- 4.4
-
add
public AlterTableSpecification add(String column, com.datastax.oss.driver.api.core.type.DataType type) Adds anADDto 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 anADDto 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 aRENAMEto 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 aRENAMEto 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.
-