Class GCPSpannerExecuteDmlOp
java.lang.Object
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp<Long,com.google.cloud.spanner.ResultSet>
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerExecuteDmlOp
- All Implemented Interfaces:
CycleOp<com.google.cloud.spanner.ResultSet>,LongFunction<com.google.cloud.spanner.ResultSet>
public class GCPSpannerExecuteDmlOp
extends GCPSpannerBaseOp<Long,com.google.cloud.spanner.ResultSet>
This class represents an operation to execute a DML statement on Google Cloud Spanner.
It extends the GCPSpannerBaseOp class and overrides the applyOp method to execute the DML statement.
-
Field Summary
Fields inherited from class io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp
apiCall, logger, request, spannerClient -
Constructor Summary
ConstructorsConstructorDescriptionGCPSpannerExecuteDmlOp(com.google.cloud.spanner.Spanner spanner, Long requestParam, com.google.cloud.spanner.Statement statement, com.google.cloud.spanner.DatabaseClient dbClient) Constructs a new GCPSpannerExecuteDmlOp. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.spanner.ResultSetapplyOp(long value) Executes the DML statement using the provided value.Methods inherited from class io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp
apply, toString
-
Constructor Details
-
GCPSpannerExecuteDmlOp
public GCPSpannerExecuteDmlOp(com.google.cloud.spanner.Spanner spanner, Long requestParam, com.google.cloud.spanner.Statement statement, com.google.cloud.spanner.DatabaseClient dbClient) Constructs a new GCPSpannerExecuteDmlOp.- Parameters:
spanner- the Spanner instancerequestParam- the request parameterstatement- the DML statement to executedbClient- the DatabaseClient to use for executing the statement
-
-
Method Details
-
applyOp
public com.google.cloud.spanner.ResultSet applyOp(long value) Executes the DML statement using the provided value.- Specified by:
applyOpin classGCPSpannerBaseOp<Long,com.google.cloud.spanner.ResultSet> - Parameters:
value- the value to use for the operation- Returns:
- the result of the DML execution
-