public class AlterTableSpecification extends TableOptionsSpecification<AlterTableSpecification>
ALTER TABLE
specification.AddColumnSpecification
,
AlterColumnSpecification
,
DropColumnSpecification
,
RenameColumnSpecification
,
CreateTableSpecification
,
DropTableSpecification
,
TableOptionsSpecification
,
AlterTableCqlGenerator
Modifier and Type | Method and Description |
---|---|
AlterTableSpecification |
add(com.datastax.oss.driver.api.core.CqlIdentifier column,
com.datastax.oss.driver.api.core.type.DataType type)
Adds an
ADD to the list of column changes. |
AlterTableSpecification |
add(String column,
com.datastax.oss.driver.api.core.type.DataType type)
Adds an
ADD to the list of column changes. |
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.
|
AlterTableSpecification |
alter(String column,
com.datastax.oss.driver.api.core.type.DataType type)
Adds an ALTER to the list of column changes.
|
static AlterTableSpecification |
alterTable(com.datastax.oss.driver.api.core.CqlIdentifier tableName)
Entry point into the
AlterTableSpecification 's fluent API given tableName to alter a table. |
static AlterTableSpecification |
alterTable(String tableName)
Entry point into the
AlterTableSpecification 's fluent API given tableName to alter a table. |
AlterTableSpecification |
drop(com.datastax.oss.driver.api.core.CqlIdentifier column) |
AlterTableSpecification |
drop(String column) |
List<ColumnChangeSpecification> |
getChanges()
Returns an unmodifiable list of column changes.
|
AlterTableSpecification |
rename(com.datastax.oss.driver.api.core.CqlIdentifier from,
com.datastax.oss.driver.api.core.CqlIdentifier to)
Adds a
RENAME to the list of column changes. |
AlterTableSpecification |
rename(String from,
String to)
Adds a
RENAME to the list of column changes. |
getOptions, with, with, with
getName
public static AlterTableSpecification alterTable(String tableName)
AlterTableSpecification
's fluent API given tableName
to alter a table.
Convenient if imported statically.tableName
- must not be null or empty.AlterTableSpecification
.public static AlterTableSpecification alterTable(com.datastax.oss.driver.api.core.CqlIdentifier tableName)
AlterTableSpecification
's fluent API given tableName
to alter a table.
Convenient if imported statically.tableName
- must not be null.AlterTableSpecification
.public AlterTableSpecification add(String column, com.datastax.oss.driver.api.core.type.DataType type)
ADD
to the list of column changes.column
- must not be null or empty.type
- must not be null.AlterTableSpecification
.public AlterTableSpecification add(com.datastax.oss.driver.api.core.CqlIdentifier column, com.datastax.oss.driver.api.core.type.DataType type)
ADD
to the list of column changes.column
- must not be null.type
- must not be null.AlterTableSpecification
.public AlterTableSpecification drop(String column)
public AlterTableSpecification drop(com.datastax.oss.driver.api.core.CqlIdentifier column)
public AlterTableSpecification rename(String from, String to)
RENAME
to the list of column changes.from
- must not be null or empty.to
- must not be null or empty.AlterTableSpecification
.public AlterTableSpecification rename(com.datastax.oss.driver.api.core.CqlIdentifier from, com.datastax.oss.driver.api.core.CqlIdentifier to)
RENAME
to the list of column changes.from
- must not be null.to
- must not be null.AlterTableSpecification
.public AlterTableSpecification alter(String column, com.datastax.oss.driver.api.core.type.DataType type)
column
- must not be null or emptytype
- must not be nullAlterTableSpecification
.public AlterTableSpecification alter(com.datastax.oss.driver.api.core.CqlIdentifier column, com.datastax.oss.driver.api.core.type.DataType type)
column
- must not be null.type
- must not be null.AlterTableSpecification
.public List<ColumnChangeSpecification> getChanges()
Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.