Package io.stargate.sdk.rest
Class IndexClient
java.lang.Object
io.stargate.sdk.rest.IndexClient
Working with indices in the classes.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
FieldsModifier and TypeFieldDescription/v2/schemas/keyspaces/{keyspace}/tables/{tableName}/indexes/{indexName} -
Constructor Summary
ConstructorsConstructorDescriptionIndexClient(LoadBalancedHttpClient stargateHttpClient, TableClient tableClient, String indexName) Constructor focusing on a single Column -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(CreateIndex ci) Create an index.voiddelete()Delete an index.booleanexist()Check if the column exist on thefind()Get metadata of the collection.
-
Field Details
-
indexSchemaResource
/v2/schemas/keyspaces/{keyspace}/tables/{tableName}/indexes/{indexName}
-
-
Constructor Details
-
IndexClient
public IndexClient(LoadBalancedHttpClient stargateHttpClient, TableClient tableClient, String indexName) Constructor focusing on a single Column- Parameters:
stargateHttpClient- stargateHttpClienttableClient- table resource clientindexName- current index identifier
-
-
Method Details
-
find
Get metadata of the collection. There is no dedicated resources we use the list and filter with what we need.- Returns:
- metadata of the collection if its exist or empty
-
exist
public boolean exist()Check if the column exist on the- Returns:
- boolean
-
create
Create an index.- Parameters:
ci- new index to create- See Also:
-
delete
public void delete()Delete an index.- See Also:
-