Class AlterTableDropColumns
java.lang.Object
com.datastax.astra.client.tables.commands.AlterTableDropColumns
- All Implemented Interfaces:
AlterTableOperation
Represents an operation to drop columns from a table in a database schema alteration.
Implements the
AlterTableOperation
interface to specify the "drop" operation.
This class supports adding columns to be dropped, with an optional "if exists" clause.
Example usage:
AlterTableDropColumns dropColumns = new AlterTableDropColumns()
.ifExists()
.columns("column3");
-
Constructor Summary
ConstructorDescriptionAlterTableDropColumns
(String... name) Constructs a newAlterTableDropColumns
instance with the specified column names.AlterTableDropColumns
(Set<String> columns) Constructs a newAlterTableDropColumns
instance with the specified set of column names. -
Method Summary
Modifier and TypeMethodDescriptionAdds additional column names to the list of columns to drop.Returns the name of this operation, which is "drop".
-
Constructor Details
-
AlterTableDropColumns
Constructs a newAlterTableDropColumns
instance with the specified column names.- Parameters:
name
- the names of the columns to drop
-
AlterTableDropColumns
Constructs a newAlterTableDropColumns
instance with the specified set of column names.- Parameters:
columns
- the set of column names to drop
-
-
Method Details
-
columns
Adds additional column names to the list of columns to drop.- Parameters:
columns
- the names of the columns to add- Returns:
- this
AlterTableDropColumns
instance
-
getOperationName
Returns the name of this operation, which is "drop".- Specified by:
getOperationName
in interfaceAlterTableOperation
- Returns:
- the operation name
-