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.
  • 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 instance
      requestParam - the request parameter
      statement - the DML statement to execute
      dbClient - 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:
      applyOp in class GCPSpannerBaseOp<Long,com.google.cloud.spanner.ResultSet>
      Parameters:
      value - the value to use for the operation
      Returns:
      the result of the DML execution