Class UpdateDatabaseDdlRequest (6.66.0)

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

PROTO_DESCRIPTORS_FIELD_NUMBER

public static final int PROTO_DESCRIPTORS_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()
Returns
Type Description
UpdateDatabaseDdlRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static UpdateDatabaseDdlRequest.Builder newBuilder()
Returns
Type Description
UpdateDatabaseDdlRequest.Builder

newBuilder(UpdateDatabaseDdlRequest prototype)

public static UpdateDatabaseDdlRequest.Builder newBuilder(UpdateDatabaseDdlRequest prototype)
Parameter
Name Description
prototype UpdateDatabaseDdlRequest
Returns
Type Description
UpdateDatabaseDdlRequest.Builder

parseDelimitedFrom(InputStream input)

public static UpdateDatabaseDdlRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static UpdateDatabaseDdlRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static UpdateDatabaseDdlRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static UpdateDatabaseDdlRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static UpdateDatabaseDdlRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static UpdateDatabaseDdlRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UpdateDatabaseDdlRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<UpdateDatabaseDdlRequest> parser()
Returns
Type Description
Parser<UpdateDatabaseDdlRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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()
Returns
Type Description
UpdateDatabaseDdlRequest

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
Type Description
Parser<UpdateDatabaseDdlRequest>
Overrides

getProtoDescriptors()

public ByteString getProtoDescriptors()

Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized google.protobuf.FileDescriptorSet. To generate it, install and run protoc with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run <code><code> $protoc --proto_path=/app_path --proto_path=/lib_path &#92; --include_imports &#92; --descriptor_set_out=descriptors.data &#92; moon/shot/app.proto </code></code> For more details, see protobuffer self description.

bytes proto_descriptors = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The protoDescriptors.

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];

Returns
Type Description
ProtocolStringList

A list containing the statements.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public UpdateDatabaseDdlRequest.Builder newBuilderForType()
Returns
Type Description
UpdateDatabaseDdlRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected UpdateDatabaseDdlRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
UpdateDatabaseDdlRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public UpdateDatabaseDdlRequest.Builder toBuilder()
Returns
Type Description
UpdateDatabaseDdlRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException