Class GCPSpannerInsertOp

java.lang.Object
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp<Long,com.google.cloud.Timestamp>
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerInsertOp
All Implemented Interfaces:
CycleOp<com.google.cloud.Timestamp>, LongFunction<com.google.cloud.Timestamp>

public class GCPSpannerInsertOp extends GCPSpannerBaseOp<Long,com.google.cloud.Timestamp>
This class represents an operation to insert a vector into a Google Cloud Spanner database. It extends the GCPSpannerBaseOp class and provides the implementation for the applyOp method.
  • Constructor Details

    • GCPSpannerInsertOp

      public GCPSpannerInsertOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, com.google.cloud.spanner.Mutation mutation, com.google.cloud.spanner.DatabaseClient dbClient)
      Constructs a new GCPSpannerInsertVectorOp.
      Parameters:
      searchIndexClient - the Spanner client used to interact with the database
      requestParam - the request parameter
      mutation - the Mutation object representing the data to be inserted
      dbClient - the DatabaseClient used to execute the mutation
  • Method Details

    • applyOp

      public com.google.cloud.Timestamp applyOp(long value)
      Applies the insert operation using the provided mutation.
      Specified by:
      applyOp in class GCPSpannerBaseOp<Long,com.google.cloud.Timestamp>
      Parameters:
      value - the value to be used in the operation
      Returns:
      the result of the write operation