Class UpdateDatabaseDdlRequest.Builder (6.25.1)

public static final class UpdateDatabaseDdlRequest.Builder extends GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder> implements UpdateDatabaseDdlRequestOrBuilder

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()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllStatements(Iterable<String> values)

public UpdateDatabaseDdlRequest.Builder addAllStatements(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)

public UpdateDatabaseDdlRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

addStatements(String value)

public UpdateDatabaseDdlRequest.Builder addStatements(String value)

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)

public UpdateDatabaseDdlRequest.Builder addStatementsBytes(ByteString value)

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()

public UpdateDatabaseDdlRequest build()
Returns
TypeDescription
UpdateDatabaseDdlRequest

buildPartial()

public UpdateDatabaseDdlRequest buildPartial()
Returns
TypeDescription
UpdateDatabaseDdlRequest

clear()

public UpdateDatabaseDdlRequest.Builder clear()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

clearDatabase()

public UpdateDatabaseDdlRequest.Builder clearDatabase()

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)

public UpdateDatabaseDdlRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public UpdateDatabaseDdlRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

clearOperationId()

public UpdateDatabaseDdlRequest.Builder clearOperationId()

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.

clearStatements()

public UpdateDatabaseDdlRequest.Builder clearStatements()

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()

public UpdateDatabaseDdlRequest.Builder clone()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

getDatabase()

public String getDatabase()

Required. The database to update.

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

Returns
TypeDescription
String

The database.

getDatabaseBytes()

public ByteString getDatabaseBytes()

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()

public UpdateDatabaseDdlRequest getDefaultInstanceForType()
Returns
TypeDescription
UpdateDatabaseDdlRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOperationId()

public String getOperationId()

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()

public ByteString getOperationIdBytes()

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.

getStatements(int index)

public String getStatements(int index)

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)

public ByteString getStatementsBytes(int index)

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()

public int getStatementsCount()

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()

public ProtocolStringList getStatementsList()

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()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public UpdateDatabaseDdlRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public UpdateDatabaseDdlRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

mergeFrom(UpdateDatabaseDdlRequest other)

public UpdateDatabaseDdlRequest.Builder mergeFrom(UpdateDatabaseDdlRequest other)
Parameter
NameDescription
otherUpdateDatabaseDdlRequest
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final UpdateDatabaseDdlRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

setDatabase(String value)

public UpdateDatabaseDdlRequest.Builder setDatabase(String value)

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)

public UpdateDatabaseDdlRequest.Builder setDatabaseBytes(ByteString value)

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)

public UpdateDatabaseDdlRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

setOperationId(String value)

public UpdateDatabaseDdlRequest.Builder setOperationId(String value)

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)

public UpdateDatabaseDdlRequest.Builder setOperationIdBytes(ByteString value)

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.

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

public UpdateDatabaseDdlRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

setStatements(int index, String value)

public UpdateDatabaseDdlRequest.Builder setStatements(int index, String value)

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)

public final UpdateDatabaseDdlRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides