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