Class TableIndexDefinition<OPTIONS>
java.lang.Object
com.datastax.astra.client.tables.definition.indexes.TableIndexDefinition<OPTIONS>
- Type Parameters:
OPTIONS
- the type of options (vector, normal) for index definition.
- Direct Known Subclasses:
TableRegularIndexDefinition
,TableTextIndexDefinition
,TableVectorIndexDefinition
Represents the base class for table index definitions, encapsulating common properties
and behaviors for index definitions, including the column being indexed and API support
for index-related operations.
Subclasses should extend this abstract class to implement specific types of index definitions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TableIndexDefinitionApiSupport
The API support configuration for the table index.protected TableIndexColumnDefinition
The name of the column that the index is associated with.protected final Function
<OPTIONS, ? extends TableIndexDefinition<OPTIONS>> Constructor function to create new instances in subclasses.protected OPTIONS
The Options for this particular index. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TableIndexDefinition
(Function<OPTIONS, ? extends TableIndexDefinition<OPTIONS>> constructor) Constructs a new instance ofTableIndexDefinition
with the specified constructor function. -
Method Summary
Modifier and TypeMethodDescriptionSets the name of the column for the index.column
(String column, TableIndexMapTypes type) Sets the name of the column for the index.protected TableIndexDefinition
<OPTIONS> mapImpl
(Consumer<TableIndexDefinition<OPTIONS>> updater) Maps the current instance to a new instance with updated properties.Sets the options for configuring the table index.
-
Field Details
-
column
The name of the column that the index is associated with. -
apiSupport
The API support configuration for the table index. -
options
The Options for this particular index. -
constructor
Constructor function to create new instances in subclasses.
-
-
Constructor Details
-
TableIndexDefinition
protected TableIndexDefinition(Function<OPTIONS, ? extends TableIndexDefinition<OPTIONS>> constructor) Constructs a new instance ofTableIndexDefinition
with the specified constructor function.- Parameters:
constructor
- the constructor function for creating new instances of the subclass.
-
-
Method Details
-
mapImpl
Maps the current instance to a new instance with updated properties.- Parameters:
updater
- a consumer function that updates the properties of the new instance.- Returns:
- a new instance with the updated properties.
-
column
Sets the name of the column for the index.- Parameters:
column
- the name of the column to be indexed.- Returns:
- a new instance with the updated column.
-
column
Sets the name of the column for the index.- 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
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.
-