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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > UpdateDatabaseDdlRequest.BuilderImplements
UpdateDatabaseDdlRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
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];
Name | Description |
values | Iterable<String> The statements to add. |
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public UpdateDatabaseDdlRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
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];
Name | Description |
value | String The statements to add. |
Type | Description |
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];
Name | Description |
value | ByteString The bytes of the statements to add. |
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
build()
public UpdateDatabaseDdlRequest build()
Type | Description |
UpdateDatabaseDdlRequest |
buildPartial()
public UpdateDatabaseDdlRequest buildPartial()
Type | Description |
UpdateDatabaseDdlRequest |
clear()
public UpdateDatabaseDdlRequest.Builder clear()
Type | Description |
UpdateDatabaseDdlRequest.Builder |
clearDatabase()
public UpdateDatabaseDdlRequest.Builder clearDatabase()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public UpdateDatabaseDdlRequest.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public UpdateDatabaseDdlRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
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;
Type | Description |
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];
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
clone()
public UpdateDatabaseDdlRequest.Builder clone()
Type | Description |
UpdateDatabaseDdlRequest.Builder |
getDatabase()
public String getDatabase()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Type | Description |
String | The database. |
getDatabaseBytes()
public ByteString getDatabaseBytes()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Type | Description |
ByteString | The bytes for database. |
getDefaultInstanceForType()
public UpdateDatabaseDdlRequest getDefaultInstanceForType()
Type | Description |
UpdateDatabaseDdlRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
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;
Type | Description |
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;
Type | Description |
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];
Name | Description |
index | int The index of the element to return. |
Type | Description |
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];
Name | Description |
index | int The index of the value to return. |
Type | Description |
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];
Type | Description |
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];
Type | Description |
ProtocolStringList | A list containing the statements. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public UpdateDatabaseDdlRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public UpdateDatabaseDdlRequest.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
mergeFrom(UpdateDatabaseDdlRequest other)
public UpdateDatabaseDdlRequest.Builder mergeFrom(UpdateDatabaseDdlRequest other)
Name | Description |
other | UpdateDatabaseDdlRequest |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final UpdateDatabaseDdlRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
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) = { ... }
Name | Description |
value | String The database to set. |
Type | Description |
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) = { ... }
Name | Description |
value | ByteString The bytes for database to set. |
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public UpdateDatabaseDdlRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
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;
Name | Description |
value | String The operationId to set. |
Type | Description |
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;
Name | Description |
value | ByteString The bytes for operationId to set. |
Type | Description |
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)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
UpdateDatabaseDdlRequest.Builder |
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];
Name | Description |
index | int The index to set the value at. |
value | String The statements to set. |
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final UpdateDatabaseDdlRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
UpdateDatabaseDdlRequest.Builder |