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