Class AlterTableAddVectorize
java.lang.Object
com.datastax.astra.client.tables.commands.AlterTableAddVectorize
- All Implemented Interfaces:
AlterTableOperation
Represents an operation to add vectorized columns to a table in a database schema alteration.
Implements the
AlterTableOperation
interface to specify the "addVectorize" operation.
This class allows adding columns with vectorization options and supports an optional "IF NOT EXISTS" clause.
Example usage:
AlterTableAddVectorize addVectorize = new AlterTableAddVectorize()
.ifNotExists()
.addColumn("vectorColumn", new VectorServiceOptions());
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddColumn
(String name, VectorServiceOptions def) Adds a new column with the specified name and vectorization options.columns
(Map<String, VectorServiceOptions> columns) Replaces the current column definitions with the specified map of column names and vectorization options.Returns the name of this operation, which is "addVectorize".
-
Constructor Details
-
AlterTableAddVectorize
public AlterTableAddVectorize()Default constructor.
-
-
Method Details
-
getOperationName
Returns the name of this operation, which is "addVectorize".- Specified by:
getOperationName
in interfaceAlterTableOperation
- Returns:
- the operation name
-
addColumn
Adds a new column with the specified name and vectorization options.- Parameters:
name
- the name of the column to adddef
- the vectorization options for the column- Returns:
- this
AlterTableAddVectorize
instance
-
columns
Replaces the current column definitions with the specified map of column names and vectorization options.- Parameters:
columns
- a map of column names to their vectorization options- Returns:
- this
AlterTableAddVectorize
instance
-