Package io.stargate.sdk.gql
Class GraphQLKeyspaceDDLClient
java.lang.Object
io.stargate.sdk.gql.GraphQLKeyspaceDDLClient
Implementations of CQL First Approaches, DDL.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
FieldsModifier and TypeFieldDescriptionMapping from root URL to rest endpoint listing keyspaces definitions.static final StringURL part. -
Constructor Summary
ConstructorsConstructorDescriptionGraphQLKeyspaceDDLClient(LoadBalancedHttpClient stargateClient) Constructor with StargateClient as argument. -
Method Summary
Modifier and TypeMethodDescriptioncreateKeyspaceSimple(String keyspaceName, int replicas) Mutation to create a keyspace.Generic Query execution.keyspace(String keyspaceName, KeyspaceProjectionRoot projection) Using the keyspace(...) functions about cql Schema.List keyspaces.keyspaces(KeyspacesProjectionRoot projection) List keyspaces.
-
Field Details
-
PATH_CQL_FIRST_DDL
URL part.- See Also:
-
cqlSchemaResource
Mapping from root URL to rest endpoint listing keyspaces definitions.
-
-
Constructor Details
-
GraphQLKeyspaceDDLClient
Constructor with StargateClient as argument.- Parameters:
stargateClient- stargate client
-
-
Method Details
-
execute
Generic Query execution.- Parameters:
input- query to execute- Returns:
- (dynamic) response
-
keyspaces
List keyspaces.- Returns:
- list of keyspaces.
-
keyspaces
List keyspaces.- Parameters:
projection- projection to get output in Java- Returns:
- list of keyspaces.
-
keyspace
Using the keyspace(...) functions about cql Schema.- Parameters:
keyspaceName- keyspace nameprojection- projection- Returns:
- keyspace if exists
-
createKeyspaceSimple
Mutation to create a keyspace.- Parameters:
keyspaceName- stargate keyspace namereplicas- replicas count- Returns:
- response from graphQL
-