Class GCPSpannerCreateDatabaseDdlOp

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

public class GCPSpannerCreateDatabaseDdlOp extends GCPSpannerBaseOp<Long,com.google.cloud.spanner.Database>
This class represents an operation to create 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

    • GCPSpannerCreateDatabaseDdlOp

      public GCPSpannerCreateDatabaseDdlOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, String databaseId, com.google.cloud.spanner.DatabaseAdminClient dbAdminClient, String instanceId)
      Parameters:
      searchIndexClient - the Spanner client
      requestParam - the request parameter
      databaseId - the SQL statement to create the table
      dbAdminClient - the DatabaseAdminClient to execute the DDL update
      instanceId - the instance ID string representing the target spanner instance
  • Method Details

    • applyOp

      public com.google.cloud.spanner.Database applyOp(long value)
      Applies the DDL create database operation.
      Specified by:
      applyOp in class GCPSpannerBaseOp<Long,com.google.cloud.spanner.Database>
      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