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.protected
Constructor 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:TableIndexDefinition
Sets the name of the column for the index.- Overrides:
column
in 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:TableIndexDefinition
Sets the name of the column for the index.- Overrides:
column
in 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
TableIndexDefinition
for method chaining.
-
options
Description copied from class:TableIndexDefinition
Sets the options for configuring the table index.- Overrides:
options
in classTableIndexDefinition<TableIndexDefinitionOptions>
- Parameters:
options
- an instance ofTableIndexDefinitionOptions
containing index options.- Returns:
- the current instance of
TableIndexDefinition
for method chaining.
-
ascii
Enables or disables ASCII encoding for the index.- Parameters:
ascii
-true
to enable ASCII encoding,false
otherwise.- Returns:
- the current instance of
TableIndexDefinition
for method chaining.
-
normalize
Enables or disables normalization for the index.- Parameters:
normalize
-true
to enable normalization,false
otherwise.- Returns:
- the current instance of
TableIndexDefinition
for method chaining.
-
caseSensitive
Sets whether the index should be case-sensitive.- Parameters:
caseSensitive
-true
if the index should be case-sensitive,false
otherwise.- Returns:
- the current instance of
TableIndexDefinition
for method chaining.
-