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.-
Field Summary
Fields inherited from class io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp
apiCall, logger, request, spannerClient -
Constructor Summary
ConstructorsConstructorDescriptionGCPSpannerCreateDatabaseDdlOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, String databaseId, com.google.cloud.spanner.DatabaseAdminClient dbAdminClient, String instanceId) Constructs a newGCPSpannerUpdateDatabaseDdlOp. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.spanner.DatabaseapplyOp(long value) Applies the DDL create database operation.Methods inherited from class io.nosqlbench.adapter.gcpspanner.ops.GCPSpannerBaseOp
apply, toString
-
Constructor Details
-
GCPSpannerCreateDatabaseDdlOp
public GCPSpannerCreateDatabaseDdlOp(com.google.cloud.spanner.Spanner searchIndexClient, Long requestParam, String databaseId, com.google.cloud.spanner.DatabaseAdminClient dbAdminClient, String instanceId) Constructs a newGCPSpannerUpdateDatabaseDdlOp.- Parameters:
searchIndexClient- theSpannerclientrequestParam- the request parameterdatabaseId- the SQL statement to create the tabledbAdminClient- theDatabaseAdminClientto execute the DDL updateinstanceId- 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:
applyOpin classGCPSpannerBaseOp<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
-