Class TableRegularIndexDefinition
java.lang.Object
com.datastax.astra.client.tables.definition.indexes.TableIndexDefinition<TableIndexDefinitionOptions>
com.datastax.astra.client.tables.definition.indexes.TableRegularIndexDefinition
Represents a definition for table indices, allowing customization of various indexing options.
This class provides a fluent interface to configure column names and index properties
such as ASCII encoding, normalization, and case sensitivity.
Example usage:
TableIndexDefinition indexDefinition = new TableIndexDefinition()
.column("username")
.ascii(true)
.normalize(false)
.caseSensitive(true);
-
Field Summary
Fields inherited from class com.datastax.astra.client.tables.definition.indexes.TableIndexDefinition
apiSupport, column, constructor, options -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructor.protectedConstructor that accepts a set of index options. -
Method Summary
Modifier and TypeMethodDescriptionascii(boolean ascii) Enables or disables ASCII encoding for the index.caseSensitive(boolean caseSensitive) Sets whether the index should be case-sensitive.Sets the name of the column for the index.column(String column, TableIndexMapTypes type) Sets the name of the column for the index.normalize(boolean normalize) Enables or disables normalization for the index.options(TableIndexDefinitionOptions options) Sets the options for configuring the table index.Methods inherited from class com.datastax.astra.client.tables.definition.indexes.TableIndexDefinition
mapImpl
-
Constructor Details
-
TableRegularIndexDefinition
public TableRegularIndexDefinition()Default constructor. -
TableRegularIndexDefinition
Constructor that accepts a set of index options.- Parameters:
options- the index options to use.
-
-
Method Details
-
column
Description copied from class:TableIndexDefinitionSets the name of the column for the index.- Overrides:
columnin classTableIndexDefinition<TableIndexDefinitionOptions>- Parameters:
column- the name of the column to be indexed.- Returns:
- a new instance with the updated column.
-
column
Description copied from class:TableIndexDefinitionSets the name of the column for the index.- Overrides:
columnin classTableIndexDefinition<TableIndexDefinitionOptions>- Parameters:
column- the name of the column to be indexed.type- the type of the column to be indexed.- Returns:
- the current instance of
TableIndexDefinitionfor method chaining.
-
options
Description copied from class:TableIndexDefinitionSets the options for configuring the table index.- Overrides:
optionsin classTableIndexDefinition<TableIndexDefinitionOptions>- Parameters:
options- an instance ofTableIndexDefinitionOptionscontaining index options.- Returns:
- the current instance of
TableIndexDefinitionfor method chaining.
-
ascii
Enables or disables ASCII encoding for the index.- Parameters:
ascii-trueto enable ASCII encoding,falseotherwise.- Returns:
- the current instance of
TableIndexDefinitionfor method chaining.
-
normalize
Enables or disables normalization for the index.- Parameters:
normalize-trueto enable normalization,falseotherwise.- Returns:
- the current instance of
TableIndexDefinitionfor method chaining.
-
caseSensitive
Sets whether the index should be case-sensitive.- Parameters:
caseSensitive-trueif the index should be case-sensitive,falseotherwise.- Returns:
- the current instance of
TableIndexDefinitionfor method chaining.
-