Class UpdateDatabaseDdlRequest.Builder (6.89.0)

publicstaticfinalclassUpdateDatabaseDdlRequest.BuilderextendsGeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>implementsUpdateDatabaseDdlRequestOrBuilder

Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a NULL value in a column to which NOT NULL would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled.

Each batch of statements is assigned a name which can be used with the Operations API to monitor progress. See the operation_id field for more details.

Protobuf type google.spanner.admin.database.v1.UpdateDatabaseDdlRequest

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllStatements(Iterable<String> values)

publicUpdateDatabaseDdlRequest.BuilderaddAllStatements(Iterable<String>values)

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valuesIterable<String>

The statements to add.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicUpdateDatabaseDdlRequest.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

addStatements(String value)

publicUpdateDatabaseDdlRequest.BuilderaddStatements(Stringvalue)

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The statements to add.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

addStatementsBytes(ByteString value)

publicUpdateDatabaseDdlRequest.BuilderaddStatementsBytes(ByteStringvalue)

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes of the statements to add.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

build()

publicUpdateDatabaseDdlRequestbuild()
Returns
TypeDescription
UpdateDatabaseDdlRequest

buildPartial()

publicUpdateDatabaseDdlRequestbuildPartial()
Returns
TypeDescription
UpdateDatabaseDdlRequest

clear()

publicUpdateDatabaseDdlRequest.Builderclear()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

clearDatabase()

publicUpdateDatabaseDdlRequest.BuilderclearDatabase()

Required. The database to update.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicUpdateDatabaseDdlRequest.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicUpdateDatabaseDdlRequest.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

clearOperationId()

publicUpdateDatabaseDdlRequest.BuilderclearOperationId()

If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, operation_id is used to construct the name of the resulting Operation.

Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and operation_id fields can be combined to form the name of the resulting longrunning.Operation: <database>/operations/<operation_id>.

operation_id should be unique within the database, and must be a valid identifier: a-z*. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns ALREADY_EXISTS.

string operation_id = 3;

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

clearProtoDescriptors()

publicUpdateDatabaseDdlRequest.BuilderclearProtoDescriptors()

Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized google.protobuf.FileDescriptorSet. To generate it, install and run protoc with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run <code><code> $protoc --proto_path=/app_path --proto_path=/lib_path &#92; --include_imports &#92; --descriptor_set_out=descriptors.data &#92; moon/shot/app.proto </code></code> For more details, see protobuffer self description.

bytes proto_descriptors = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

clearStatements()

publicUpdateDatabaseDdlRequest.BuilderclearStatements()

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

clone()

publicUpdateDatabaseDdlRequest.Builderclone()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

getDatabase()

publicStringgetDatabase()

Required. The database to update.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The database.

getDatabaseBytes()

publicByteStringgetDatabaseBytes()

Required. The database to update.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for database.

getDefaultInstanceForType()

publicUpdateDatabaseDdlRequestgetDefaultInstanceForType()
Returns
TypeDescription
UpdateDatabaseDdlRequest

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOperationId()

publicStringgetOperationId()

If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, operation_id is used to construct the name of the resulting Operation.

Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and operation_id fields can be combined to form the name of the resulting longrunning.Operation: <database>/operations/<operation_id>.

operation_id should be unique within the database, and must be a valid identifier: a-z*. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns ALREADY_EXISTS.

string operation_id = 3;

Returns
TypeDescription
String

The operationId.

getOperationIdBytes()

publicByteStringgetOperationIdBytes()

If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, operation_id is used to construct the name of the resulting Operation.

Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and operation_id fields can be combined to form the name of the resulting longrunning.Operation: <database>/operations/<operation_id>.

operation_id should be unique within the database, and must be a valid identifier: a-z*. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns ALREADY_EXISTS.

string operation_id = 3;

Returns
TypeDescription
ByteString

The bytes for operationId.

getProtoDescriptors()

publicByteStringgetProtoDescriptors()

Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized google.protobuf.FileDescriptorSet. To generate it, install and run protoc with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run <code><code> $protoc --proto_path=/app_path --proto_path=/lib_path &#92; --include_imports &#92; --descriptor_set_out=descriptors.data &#92; moon/shot/app.proto </code></code> For more details, see protobuffer self description.

bytes proto_descriptors = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The protoDescriptors.

getStatements(int index)

publicStringgetStatements(intindex)

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The statements at the given index.

getStatementsBytes(int index)

publicByteStringgetStatementsBytes(intindex)

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the statements at the given index.

getStatementsCount()

publicintgetStatementsCount()

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The count of statements.

getStatementsList()

publicProtocolStringListgetStatementsList()

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ProtocolStringList

A list containing the statements.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicUpdateDatabaseDdlRequest.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

publicUpdateDatabaseDdlRequest.BuildermergeFrom(Messageother)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

mergeFrom(UpdateDatabaseDdlRequest other)

publicUpdateDatabaseDdlRequest.BuildermergeFrom(UpdateDatabaseDdlRequestother)
Parameter
NameDescription
otherUpdateDatabaseDdlRequest
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalUpdateDatabaseDdlRequest.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

setDatabase(String value)

publicUpdateDatabaseDdlRequest.BuildersetDatabase(Stringvalue)

Required. The database to update.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The database to set.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

setDatabaseBytes(ByteString value)

publicUpdateDatabaseDdlRequest.BuildersetDatabaseBytes(ByteStringvalue)

Required. The database to update.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for database to set.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicUpdateDatabaseDdlRequest.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

setOperationId(String value)

publicUpdateDatabaseDdlRequest.BuildersetOperationId(Stringvalue)

If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, operation_id is used to construct the name of the resulting Operation.

Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and operation_id fields can be combined to form the name of the resulting longrunning.Operation: <database>/operations/<operation_id>.

operation_id should be unique within the database, and must be a valid identifier: a-z*. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns ALREADY_EXISTS.

string operation_id = 3;

Parameter
NameDescription
valueString

The operationId to set.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

setOperationIdBytes(ByteString value)

publicUpdateDatabaseDdlRequest.BuildersetOperationIdBytes(ByteStringvalue)

If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, operation_id is used to construct the name of the resulting Operation.

Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and operation_id fields can be combined to form the name of the resulting longrunning.Operation: <database>/operations/<operation_id>.

operation_id should be unique within the database, and must be a valid identifier: a-z*. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns ALREADY_EXISTS.

string operation_id = 3;

Parameter
NameDescription
valueByteString

The bytes for operationId to set.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

setProtoDescriptors(ByteString value)

publicUpdateDatabaseDdlRequest.BuildersetProtoDescriptors(ByteStringvalue)

Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized google.protobuf.FileDescriptorSet. To generate it, install and run protoc with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run <code><code> $protoc --proto_path=/app_path --proto_path=/lib_path &#92; --include_imports &#92; --descriptor_set_out=descriptors.data &#92; moon/shot/app.proto </code></code> For more details, see protobuffer self description.

bytes proto_descriptors = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The protoDescriptors to set.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicUpdateDatabaseDdlRequest.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

setStatements(int index, String value)

publicUpdateDatabaseDdlRequest.BuildersetStatements(intindex,Stringvalue)

Required. DDL statements to be applied to the database.

repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The statements to set.

Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalUpdateDatabaseDdlRequest.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides