Class GCPSpannerUpdateDatabaseDdlOp

java.lang.Object
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp<Long,Void>
io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerUpdateDatabaseDdlOp
All Implemented Interfaces:
CycleOp<Void>, LongFunction<Void>

public class GCPSpannerUpdateDatabaseDdlOp extends GCPSpannerBaseOp<Long,Void>
This class represents an operation to update the database DDL (Data Definition Language) in Google Cloud Spanner. It extends the GCPSpannerBaseOp class and provides the implementation for applying the DDL update operation.
  • Constructor Details

    • GCPSpannerUpdateDatabaseDdlOp

      public GCPSpannerUpdateDatabaseDdlOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, String createTableStatement, com.google.cloud.spanner.DatabaseAdminClient dbAdminClient, com.google.cloud.spanner.Database db)
      Constructs a new GCPSpannerUpdateDatabaseDdlOp.
      Parameters:
      searchIndexClient - the Spanner client
      requestParam - the request parameter
      createTableStatement - the SQL statement to create the table
      dbAdminClient - the DatabaseAdminClient to execute the DDL update
      db - the Database object representing the target database
  • Method Details

    • applyOp

      public Void applyOp(long value)
      Applies the DDL update operation.
      Specified by:
      applyOp in class GCPSpannerBaseOp<Long,Void>
      Parameters:
      value - the value to be used in the operation
      Returns:
      the result of the operation
      Throws:
      RuntimeException - if an error occurs during the operation