Class UpdateDatabaseDdlRequest (6.52.1)

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
TypeDescription
int

OPERATION_ID_FIELD_NUMBER

public static final int OPERATION_ID_FIELD_NUMBER
Field Value
TypeDescription
int

STATEMENTS_FIELD_NUMBER

public static final int STATEMENTS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static UpdateDatabaseDdlRequest getDefaultInstance()
Returns
TypeDescription
UpdateDatabaseDdlRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static UpdateDatabaseDdlRequest.Builder newBuilder()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

newBuilder(UpdateDatabaseDdlRequest prototype)

public static UpdateDatabaseDdlRequest.Builder newBuilder(UpdateDatabaseDdlRequest prototype)
Parameter
NameDescription
prototypeUpdateDatabaseDdlRequest
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

parseDelimitedFrom(InputStream input)

public static UpdateDatabaseDdlRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static UpdateDatabaseDdlRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static UpdateDatabaseDdlRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static UpdateDatabaseDdlRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static UpdateDatabaseDdlRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static UpdateDatabaseDdlRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static UpdateDatabaseDdlRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
UpdateDatabaseDdlRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<UpdateDatabaseDdlRequest> parser()
Returns
TypeDescription
Parser<UpdateDatabaseDdlRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDatabase()

public String getDatabase()

Required. The database to update.

string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
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
TypeDescription
ByteString

The bytes for database.

getDefaultInstanceForType()

public UpdateDatabaseDdlRequest getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for operationId.

getParserForType()

public Parser<UpdateDatabaseDdlRequest> getParserForType()
Returns
TypeDescription
Parser<UpdateDatabaseDdlRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the statements.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public UpdateDatabaseDdlRequest.Builder newBuilderForType()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected UpdateDatabaseDdlRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public UpdateDatabaseDdlRequest.Builder toBuilder()
Returns
TypeDescription
UpdateDatabaseDdlRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException