public final class ExecuteSqlRequest extends com.google.protobuf.GeneratedMessageV3 implements ExecuteSqlRequestOrBuilder
The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].Protobuf type
google.spanner.v1.ExecuteSqlRequest| Modifier and Type | Class and Description |
|---|---|
static class |
ExecuteSqlRequest.Builder
The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and
[ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
|
static class |
ExecuteSqlRequest.QueryMode
Mode in which the statement must be processed.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
PARAM_TYPES_FIELD_NUMBER |
static int |
PARAMS_FIELD_NUMBER |
static int |
PARTITION_TOKEN_FIELD_NUMBER |
static int |
QUERY_MODE_FIELD_NUMBER |
static int |
RESUME_TOKEN_FIELD_NUMBER |
static int |
SEQNO_FIELD_NUMBER |
static int |
SESSION_FIELD_NUMBER |
static int |
SQL_FIELD_NUMBER |
static int |
TRANSACTION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsParamTypes(String key)
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value.
|
boolean |
equals(Object obj) |
static ExecuteSqlRequest |
getDefaultInstance() |
ExecuteSqlRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Struct |
getParams()
The SQL string can contain parameter placeholders.
|
com.google.protobuf.StructOrBuilder |
getParamsOrBuilder()
The SQL string can contain parameter placeholders.
|
Map<String,Type> |
getParamTypes()
Deprecated.
|
int |
getParamTypesCount()
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value.
|
Map<String,Type> |
getParamTypesMap()
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value.
|
Type |
getParamTypesOrDefault(String key,
Type defaultValue)
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value.
|
Type |
getParamTypesOrThrow(String key)
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value.
|
com.google.protobuf.Parser<ExecuteSqlRequest> |
getParserForType() |
com.google.protobuf.ByteString |
getPartitionToken()
If present, results will be restricted to the specified partition
previously created using PartitionQuery().
|
ExecuteSqlRequest.QueryMode |
getQueryMode()
Used to control the amount of debugging information returned in
[ResultSetStats][google.spanner.v1.ResultSetStats].
|
int |
getQueryModeValue()
Used to control the amount of debugging information returned in
[ResultSetStats][google.spanner.v1.ResultSetStats].
|
com.google.protobuf.ByteString |
getResumeToken()
If this request is resuming a previously interrupted SQL statement
execution, `resume_token` should be copied from the last
[PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption.
|
long |
getSeqno()
A per-transaction sequence number used to identify this request.
|
int |
getSerializedSize() |
String |
getSession()
Required.
|
com.google.protobuf.ByteString |
getSessionBytes()
Required.
|
String |
getSql()
Required.
|
com.google.protobuf.ByteString |
getSqlBytes()
Required.
|
TransactionSelector |
getTransaction()
The transaction to use.
|
TransactionSelectorOrBuilder |
getTransactionOrBuilder()
The transaction to use.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasParams()
The SQL string can contain parameter placeholders.
|
boolean |
hasTransaction()
The transaction to use.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static ExecuteSqlRequest.Builder |
newBuilder() |
static ExecuteSqlRequest.Builder |
newBuilder(ExecuteSqlRequest prototype) |
ExecuteSqlRequest.Builder |
newBuilderForType() |
protected ExecuteSqlRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static ExecuteSqlRequest |
parseDelimitedFrom(InputStream input) |
static ExecuteSqlRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteSqlRequest |
parseFrom(byte[] data) |
static ExecuteSqlRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteSqlRequest |
parseFrom(ByteBuffer data) |
static ExecuteSqlRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteSqlRequest |
parseFrom(com.google.protobuf.ByteString data) |
static ExecuteSqlRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteSqlRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static ExecuteSqlRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static ExecuteSqlRequest |
parseFrom(InputStream input) |
static ExecuteSqlRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<ExecuteSqlRequest> |
parser() |
ExecuteSqlRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int SESSION_FIELD_NUMBER
public static final int TRANSACTION_FIELD_NUMBER
public static final int SQL_FIELD_NUMBER
public static final int PARAMS_FIELD_NUMBER
public static final int PARAM_TYPES_FIELD_NUMBER
public static final int RESUME_TOKEN_FIELD_NUMBER
public static final int QUERY_MODE_FIELD_NUMBER
public static final int PARTITION_TOKEN_FIELD_NUMBER
public static final int SEQNO_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getSession()
Required. The session in which the SQL query should be performed.
string session = 1;getSession in interface ExecuteSqlRequestOrBuilderpublic com.google.protobuf.ByteString getSessionBytes()
Required. The session in which the SQL query should be performed.
string session = 1;getSessionBytes in interface ExecuteSqlRequestOrBuilderpublic boolean hasTransaction()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency. The transaction to use. For queries, if none is provided, the default is a temporary read-only transaction with strong concurrency. Standard DML statements require a ReadWrite transaction. Single-use transactions are not supported (to avoid replay). The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing PartitionedDml transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;hasTransaction in interface ExecuteSqlRequestOrBuilderpublic TransactionSelector getTransaction()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency. The transaction to use. For queries, if none is provided, the default is a temporary read-only transaction with strong concurrency. Standard DML statements require a ReadWrite transaction. Single-use transactions are not supported (to avoid replay). The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing PartitionedDml transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;getTransaction in interface ExecuteSqlRequestOrBuilderpublic TransactionSelectorOrBuilder getTransactionOrBuilder()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency. The transaction to use. For queries, if none is provided, the default is a temporary read-only transaction with strong concurrency. Standard DML statements require a ReadWrite transaction. Single-use transactions are not supported (to avoid replay). The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing PartitionedDml transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;getTransactionOrBuilder in interface ExecuteSqlRequestOrBuilderpublic String getSql()
Required. The SQL string.
string sql = 3;getSql in interface ExecuteSqlRequestOrBuilderpublic com.google.protobuf.ByteString getSqlBytes()
Required. The SQL string.
string sql = 3;getSqlBytes in interface ExecuteSqlRequestOrBuilderpublic boolean hasParams()
The SQL string can contain parameter placeholders. A parameter placeholder consists of `'@'` followed by the parameter name. Parameter names consist of any combination of letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute an SQL statement with unbound parameters. Parameter values are specified using `params`, which is a JSON object whose keys are parameter names, and whose values are the corresponding parameter values.
.google.protobuf.Struct params = 4;hasParams in interface ExecuteSqlRequestOrBuilderpublic com.google.protobuf.Struct getParams()
The SQL string can contain parameter placeholders. A parameter placeholder consists of `'@'` followed by the parameter name. Parameter names consist of any combination of letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute an SQL statement with unbound parameters. Parameter values are specified using `params`, which is a JSON object whose keys are parameter names, and whose values are the corresponding parameter values.
.google.protobuf.Struct params = 4;getParams in interface ExecuteSqlRequestOrBuilderpublic com.google.protobuf.StructOrBuilder getParamsOrBuilder()
The SQL string can contain parameter placeholders. A parameter placeholder consists of `'@'` followed by the parameter name. Parameter names consist of any combination of letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id > @msg_id AND id < @msg_id + 100"` It is an error to execute an SQL statement with unbound parameters. Parameter values are specified using `params`, which is a JSON object whose keys are parameter names, and whose values are the corresponding parameter values.
.google.protobuf.Struct params = 4;getParamsOrBuilder in interface ExecuteSqlRequestOrBuilderpublic int getParamTypesCount()
ExecuteSqlRequestOrBuilderIt is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.
map<string, .google.spanner.v1.Type> param_types = 5;getParamTypesCount in interface ExecuteSqlRequestOrBuilderpublic boolean containsParamTypes(String key)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.
map<string, .google.spanner.v1.Type> param_types = 5;containsParamTypes in interface ExecuteSqlRequestOrBuilder@Deprecated public Map<String,Type> getParamTypes()
getParamTypesMap() instead.getParamTypes in interface ExecuteSqlRequestOrBuilderpublic Map<String,Type> getParamTypesMap()
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.
map<string, .google.spanner.v1.Type> param_types = 5;getParamTypesMap in interface ExecuteSqlRequestOrBuilderpublic Type getParamTypesOrDefault(String key, Type defaultValue)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.
map<string, .google.spanner.v1.Type> param_types = 5;getParamTypesOrDefault in interface ExecuteSqlRequestOrBuilderpublic Type getParamTypesOrThrow(String key)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of [Type][google.spanner.v1.Type] for more information about SQL types.
map<string, .google.spanner.v1.Type> param_types = 5;getParamTypesOrThrow in interface ExecuteSqlRequestOrBuilderpublic com.google.protobuf.ByteString getResumeToken()
If this request is resuming a previously interrupted SQL statement execution, `resume_token` should be copied from the last [PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token.
bytes resume_token = 6;getResumeToken in interface ExecuteSqlRequestOrBuilderpublic int getQueryModeValue()
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats]. If [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only be set to [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL].
.google.spanner.v1.ExecuteSqlRequest.QueryMode query_mode = 7;getQueryModeValue in interface ExecuteSqlRequestOrBuilderpublic ExecuteSqlRequest.QueryMode getQueryMode()
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats]. If [partition_token][google.spanner.v1.ExecuteSqlRequest.partition_token] is set, [query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode] can only be set to [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL].
.google.spanner.v1.ExecuteSqlRequest.QueryMode query_mode = 7;getQueryMode in interface ExecuteSqlRequestOrBuilderpublic com.google.protobuf.ByteString getPartitionToken()
If present, results will be restricted to the specified partition previously created using PartitionQuery(). There must be an exact match for the values of fields common to this message and the PartitionQueryRequest message used to create this partition_token.
bytes partition_token = 8;getPartitionToken in interface ExecuteSqlRequestOrBuilderpublic long getSeqno()
A per-transaction sequence number used to identify this request. This makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution. Required for DML statements. Ignored for queries.
int64 seqno = 9;getSeqno in interface ExecuteSqlRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static ExecuteSqlRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteSqlRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteSqlRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteSqlRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteSqlRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteSqlRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static ExecuteSqlRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static ExecuteSqlRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ExecuteSqlRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static ExecuteSqlRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static ExecuteSqlRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static ExecuteSqlRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic ExecuteSqlRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static ExecuteSqlRequest.Builder newBuilder()
public static ExecuteSqlRequest.Builder newBuilder(ExecuteSqlRequest prototype)
public ExecuteSqlRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected ExecuteSqlRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static ExecuteSqlRequest getDefaultInstance()
public static com.google.protobuf.Parser<ExecuteSqlRequest> parser()
public com.google.protobuf.Parser<ExecuteSqlRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public ExecuteSqlRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2019 Google LLC. All rights reserved.