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()
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
values | Iterable<String> The statements to add. |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public UpdateDatabaseDdlRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
value | String The statements to add. |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes of the statements to add. |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
build()
public UpdateDatabaseDdlRequest build()
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest |
buildPartial()
public UpdateDatabaseDdlRequest buildPartial()
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest |
clear()
public UpdateDatabaseDdlRequest.Builder clear()
Returns | |
---|---|
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) = { ... }
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public UpdateDatabaseDdlRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public UpdateDatabaseDdlRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
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;
Returns | |
---|---|
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];
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
clone()
public UpdateDatabaseDdlRequest.Builder clone()
Returns | |
---|---|
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) = { ... }
Returns | |
---|---|
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) = { ... }
Returns | |
---|---|
Type | Description |
ByteString | The bytes for database. |
getDefaultInstanceForType()
public UpdateDatabaseDdlRequest getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
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];
Parameter | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
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];
Returns | |
---|---|
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];
Returns | |
---|---|
Type | Description |
ProtocolStringList | A list containing the statements. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public UpdateDatabaseDdlRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public UpdateDatabaseDdlRequest.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder |
mergeFrom(UpdateDatabaseDdlRequest other)
public UpdateDatabaseDdlRequest.Builder mergeFrom(UpdateDatabaseDdlRequest other)
Parameter | |
---|---|
Name | Description |
other | UpdateDatabaseDdlRequest |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final UpdateDatabaseDdlRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
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) = { ... }
Parameter | |
---|---|
Name | Description |
value | String The database to set. |
Returns | |
---|---|
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) = { ... }
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for database to set. |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public UpdateDatabaseDdlRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | String The operationId to set. |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for operationId to set. |
Returns | |
---|---|
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)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
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];
Parameters | |
---|---|
Name | Description |
index | int The index to set the value at. |
value | String The statements to set. |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final UpdateDatabaseDdlRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
UpdateDatabaseDdlRequest.Builder |