Class AlterTableOptions
java.lang.Object
com.datastax.astra.client.core.options.BaseOptions<AlterTableOptions>
com.datastax.astra.client.tables.commands.options.AlterTableOptions
- All Implemented Interfaces:
Cloneable
Represents options for altering a table in a database schema.
Extends
BaseOptions to provide additional functionality for table alteration commands.
This class supports a fluent, chainable API using the Accessors annotation.
Common options include specifying whether to include an "IF EXISTS" condition during the operation.
Example usage:
AlterTableOptions options = new AlterTableOptions()
.ifExists(true);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AlterTableOptionsA predefined instance ofAlterTableOptionswith the "IF EXISTS" condition enabled.Fields inherited from class com.datastax.astra.client.core.options.BaseOptions
commandType, dataAPIClientOptions, serializer, token -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAlterTableOptionsinstance with default settings. -
Method Summary
Modifier and TypeMethodDescriptionbooleanRetrieves the value of the "IF EXISTS" condition.Methods inherited from class com.datastax.astra.client.core.options.BaseOptions
adminAdditionalHeaders, clone, commandType, dataAPIClientOptions, databaseAdditionalHeaders, embeddingApiKey, embeddingAuthProvider, getCommandType, getDataAPIClientOptions, getRequestTimeout, getRequestTimeout, getSerializer, getTimeout, getTimeout, getToken, httpClientOptions, registerObserver, rerankingApiKey, rerankingAuthProvider, serializer, timeout, timeout, timeout, timeoutOptions, token, toString, unregisterObserver
-
Field Details
-
IF_EXISTS
A predefined instance ofAlterTableOptionswith the "IF EXISTS" condition enabled. This improves syntax for commonly used configurations.
-
-
Constructor Details
-
AlterTableOptions
public AlterTableOptions()Constructs a newAlterTableOptionsinstance with default settings. Initializes the options withCommandType.TABLE_ADMINand the default table serializer.
-
-
Method Details
-
isIfExists
public boolean isIfExists()Retrieves the value of the "IF EXISTS" condition. This condition determines whether the operation should check for the existence of the table.- Returns:
trueif the "IF EXISTS" condition is enabled,falseotherwise
-