Class TableIndexDefinition
java.lang.Object
com.datastax.astra.client.tables.definition.indexes.TableBaseIndexDefinition
com.datastax.astra.client.tables.definition.indexes.TableIndexDefinition
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.TableBaseIndexDefinition
apiSupport, column
-
Constructor Summary
-
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.normalize
(boolean normalize) Enables or disables normalization for the index.options
(TableIndexDefinitionOptions options) Sets the options for configuring the table index.
-
Constructor Details
-
TableIndexDefinition
public TableIndexDefinition()Default constructor.
-
-
Method Details
-
column
Sets the name of the column for the index.- Parameters:
column
- the name of the column to be indexed.- Returns:
- the current instance of
TableIndexDefinition
for method chaining.
-
options
Sets the options for configuring the table index.- 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.
-