public abstract class DmlFetcher<ResultT> extends CassandraFetcher<ResultT>
| Modifier and Type | Field and Description |
|---|---|
protected DbColumnGetter |
dbColumnGetter |
protected String |
keyspaceName |
protected NameMapping |
nameMapping |
protected io.stargate.bridge.proto.Schema.CqlTable |
table |
DEFAULT_CONSISTENCY, DEFAULT_PAGE_SIZE, DEFAULT_PARAMETERS, DEFAULT_SERIAL_CONSISTENCY| Modifier | Constructor and Description |
|---|---|
protected |
DmlFetcher(String keyspaceName,
io.stargate.bridge.proto.Schema.CqlTable table,
NameMapping nameMapping) |
| Modifier and Type | Method and Description |
|---|---|
protected List<BuiltCondition> |
buildClause(io.stargate.bridge.proto.Schema.CqlTable table,
graphql.schema.DataFetchingEnvironment environment) |
protected List<BuiltCondition> |
buildConditions(Map<String,Map<String,Object>> columnList) |
protected io.stargate.bridge.proto.QueryOuterClass.QueryParameters |
buildParameters(graphql.schema.DataFetchingEnvironment environment) |
protected boolean |
containsDirective(graphql.language.OperationDefinition operation,
String directive) |
protected CompletableFuture<Map<String,Object>> |
executeAsyncAccepted(io.stargate.bridge.proto.QueryOuterClass.Query query,
Object originalValue,
StargateGraphqlContext context) |
protected Integer |
getTtl(graphql.schema.DataFetchingEnvironment environment) |
protected com.google.common.collect.ImmutableMap<String,Object> |
toAcceptedMutationResult(Object originalValue)
Builds the result for a mutation that was annotated with the
@async directive. |
protected Map<String,Object> |
toBatchResult(io.stargate.bridge.proto.QueryOuterClass.Response response,
Map<String,Object> originalValue)
Builds the result for a mutation that was annotated with the
@atomic directive. |
protected List<Map<String,Object>> |
toBatchResults(io.stargate.bridge.proto.QueryOuterClass.Response response,
List<Map<String,Object>> originalValues)
Same as
#toBatchResult(Response, Map), but for a list of bulk mutations. |
protected io.stargate.bridge.proto.QueryOuterClass.Value |
toGrpcValue(io.stargate.bridge.proto.QueryOuterClass.TypeSpec type,
Object value) |
protected CompletionStage<List<Map<String,Object>>> |
toListOfAcceptedMutationResults(List<Map<String,Object>> originalValues)
Same as
toAcceptedMutationResult(Object), but for a list of bulk mutations. |
protected Map<String,Object> |
toMutationResult(io.stargate.bridge.proto.QueryOuterClass.Response response,
Object originalValue)
Builds the result for a regular non-async, non-batched mutation.
|
get, get, isApplied, isAppliedprotected final String keyspaceName
protected final io.stargate.bridge.proto.Schema.CqlTable table
protected final NameMapping nameMapping
protected final DbColumnGetter dbColumnGetter
protected DmlFetcher(String keyspaceName, io.stargate.bridge.proto.Schema.CqlTable table, NameMapping nameMapping)
protected io.stargate.bridge.proto.QueryOuterClass.QueryParameters buildParameters(graphql.schema.DataFetchingEnvironment environment)
protected List<BuiltCondition> buildConditions(Map<String,Map<String,Object>> columnList)
protected List<BuiltCondition> buildClause(io.stargate.bridge.proto.Schema.CqlTable table, graphql.schema.DataFetchingEnvironment environment)
protected boolean containsDirective(graphql.language.OperationDefinition operation,
String directive)
protected CompletableFuture<Map<String,Object>> executeAsyncAccepted(io.stargate.bridge.proto.QueryOuterClass.Query query, Object originalValue, StargateGraphqlContext context)
protected com.google.common.collect.ImmutableMap<String,Object> toAcceptedMutationResult(Object originalValue)
@async directive. This is
fire-and-forget, so we simply reflect back the input value with an additional "accepted=true"
field.protected CompletionStage<List<Map<String,Object>>> toListOfAcceptedMutationResults(List<Map<String,Object>> originalValues)
toAcceptedMutationResult(Object), but for a list of bulk mutations.protected Map<String,Object> toMutationResult(io.stargate.bridge.proto.QueryOuterClass.Response response, Object originalValue)
protected Map<String,Object> toBatchResult(io.stargate.bridge.proto.QueryOuterClass.Response response, Map<String,Object> originalValue)
@atomic directive. As a
result, it was executed as part of a CQL batch with other mutations.protected List<Map<String,Object>> toBatchResults(io.stargate.bridge.proto.QueryOuterClass.Response response, List<Map<String,Object>> originalValues)
#toBatchResult(Response, Map), but for a list of bulk mutations.protected io.stargate.bridge.proto.QueryOuterClass.Value toGrpcValue(io.stargate.bridge.proto.QueryOuterClass.TypeSpec type,
Object value)
protected Integer getTtl(graphql.schema.DataFetchingEnvironment environment)
Copyright © 2022. All rights reserved.