public final class UpdateDatabaseDdlRequest extends GeneratedMessageV3 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 Fields
DATABASE_FIELD_NUMBER
public static final int DATABASE_FIELD_NUMBER
Field Value
OPERATION_ID_FIELD_NUMBER
public static final int OPERATION_ID_FIELD_NUMBER
Field Value
STATEMENTS_FIELD_NUMBER
public static final int STATEMENTS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static UpdateDatabaseDdlRequest getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static UpdateDatabaseDdlRequest.Builder newBuilder()
Returns
newBuilder(UpdateDatabaseDdlRequest prototype)
public static UpdateDatabaseDdlRequest.Builder newBuilder(UpdateDatabaseDdlRequest prototype)
Parameter
Returns
public static UpdateDatabaseDdlRequest parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static UpdateDatabaseDdlRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static UpdateDatabaseDdlRequest parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static UpdateDatabaseDdlRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static UpdateDatabaseDdlRequest parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static UpdateDatabaseDdlRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static UpdateDatabaseDdlRequest parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static UpdateDatabaseDdlRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static UpdateDatabaseDdlRequest parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static UpdateDatabaseDdlRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static UpdateDatabaseDdlRequest parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static UpdateDatabaseDdlRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<UpdateDatabaseDdlRequest> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
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
getDefaultInstanceForType()
public UpdateDatabaseDdlRequest getDefaultInstanceForType()
Returns
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.
|
getParserForType()
public Parser<UpdateDatabaseDdlRequest> getParserForType()
Returns
Overrides
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
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
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public UpdateDatabaseDdlRequest.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected UpdateDatabaseDdlRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public UpdateDatabaseDdlRequest.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions