Package com.google.spanner.v1
Class ExecuteSqlRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
- com.google.spanner.v1.ExecuteSqlRequest.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,ExecuteSqlRequestOrBuilder
,Cloneable
- Enclosing class:
- ExecuteSqlRequest
public static final class ExecuteSqlRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder> implements ExecuteSqlRequestOrBuilder
The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
Protobuf typegoogle.spanner.v1.ExecuteSqlRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ExecuteSqlRequest.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ExecuteSqlRequest
build()
ExecuteSqlRequest
buildPartial()
ExecuteSqlRequest.Builder
clear()
ExecuteSqlRequest.Builder
clearDataBoostEnabled()
If this is for a partitioned query and this field is set to `true`, the request will be executed via Spanner independent compute resources.ExecuteSqlRequest.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
ExecuteSqlRequest.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
ExecuteSqlRequest.Builder
clearParams()
Parameter names and values that bind to placeholders in the SQL string.ExecuteSqlRequest.Builder
clearParamTypes()
ExecuteSqlRequest.Builder
clearPartitionToken()
If present, results will be restricted to the specified partition previously created using PartitionQuery().ExecuteSqlRequest.Builder
clearQueryMode()
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].ExecuteSqlRequest.Builder
clearQueryOptions()
Query optimizer configuration to use for the given query.ExecuteSqlRequest.Builder
clearRequestOptions()
Common options for this request.ExecuteSqlRequest.Builder
clearResumeToken()
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.ExecuteSqlRequest.Builder
clearSeqno()
A per-transaction sequence number used to identify this request.ExecuteSqlRequest.Builder
clearSession()
Required.ExecuteSqlRequest.Builder
clearSql()
Required.ExecuteSqlRequest.Builder
clearTransaction()
The transaction to use.ExecuteSqlRequest.Builder
clone()
boolean
containsParamTypes(String key)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value.boolean
getDataBoostEnabled()
If this is for a partitioned query and this field is set to `true`, the request will be executed via Spanner independent compute resources.ExecuteSqlRequest
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
Map<String,Type>
getMutableParamTypes()
Deprecated.com.google.protobuf.Struct
getParams()
Parameter names and values that bind to placeholders in the SQL string.com.google.protobuf.Struct.Builder
getParamsBuilder()
Parameter names and values that bind to placeholders in the SQL string.com.google.protobuf.StructOrBuilder
getParamsOrBuilder()
Parameter names and values that bind to placeholders in the SQL string.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.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].ExecuteSqlRequest.QueryOptions
getQueryOptions()
Query optimizer configuration to use for the given query.ExecuteSqlRequest.QueryOptions.Builder
getQueryOptionsBuilder()
Query optimizer configuration to use for the given query.ExecuteSqlRequest.QueryOptionsOrBuilder
getQueryOptionsOrBuilder()
Query optimizer configuration to use for the given query.RequestOptions
getRequestOptions()
Common options for this request.RequestOptions.Builder
getRequestOptionsBuilder()
Common options for this request.RequestOptionsOrBuilder
getRequestOptionsOrBuilder()
Common options for this request.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.String
getSession()
Required.com.google.protobuf.ByteString
getSessionBytes()
Required.String
getSql()
Required.com.google.protobuf.ByteString
getSqlBytes()
Required.TransactionSelector
getTransaction()
The transaction to use.TransactionSelector.Builder
getTransactionBuilder()
The transaction to use.TransactionSelectorOrBuilder
getTransactionOrBuilder()
The transaction to use.boolean
hasParams()
Parameter names and values that bind to placeholders in the SQL string.boolean
hasQueryOptions()
Query optimizer configuration to use for the given query.boolean
hasRequestOptions()
Common options for this request.boolean
hasTransaction()
The transaction to use.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
protected com.google.protobuf.MapField
internalGetMutableMapField(int number)
boolean
isInitialized()
ExecuteSqlRequest.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
ExecuteSqlRequest.Builder
mergeFrom(com.google.protobuf.Message other)
ExecuteSqlRequest.Builder
mergeFrom(ExecuteSqlRequest other)
ExecuteSqlRequest.Builder
mergeParams(com.google.protobuf.Struct value)
Parameter names and values that bind to placeholders in the SQL string.ExecuteSqlRequest.Builder
mergeQueryOptions(ExecuteSqlRequest.QueryOptions value)
Query optimizer configuration to use for the given query.ExecuteSqlRequest.Builder
mergeRequestOptions(RequestOptions value)
Common options for this request.ExecuteSqlRequest.Builder
mergeTransaction(TransactionSelector value)
The transaction to use.ExecuteSqlRequest.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
ExecuteSqlRequest.Builder
putAllParamTypes(Map<String,Type> values)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value.ExecuteSqlRequest.Builder
putParamTypes(String key, Type value)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value.ExecuteSqlRequest.Builder
removeParamTypes(String key)
It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value.ExecuteSqlRequest.Builder
setDataBoostEnabled(boolean value)
If this is for a partitioned query and this field is set to `true`, the request will be executed via Spanner independent compute resources.ExecuteSqlRequest.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ExecuteSqlRequest.Builder
setParams(com.google.protobuf.Struct value)
Parameter names and values that bind to placeholders in the SQL string.ExecuteSqlRequest.Builder
setParams(com.google.protobuf.Struct.Builder builderForValue)
Parameter names and values that bind to placeholders in the SQL string.ExecuteSqlRequest.Builder
setPartitionToken(com.google.protobuf.ByteString value)
If present, results will be restricted to the specified partition previously created using PartitionQuery().ExecuteSqlRequest.Builder
setQueryMode(ExecuteSqlRequest.QueryMode value)
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].ExecuteSqlRequest.Builder
setQueryModeValue(int value)
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].ExecuteSqlRequest.Builder
setQueryOptions(ExecuteSqlRequest.QueryOptions value)
Query optimizer configuration to use for the given query.ExecuteSqlRequest.Builder
setQueryOptions(ExecuteSqlRequest.QueryOptions.Builder builderForValue)
Query optimizer configuration to use for the given query.ExecuteSqlRequest.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
ExecuteSqlRequest.Builder
setRequestOptions(RequestOptions value)
Common options for this request.ExecuteSqlRequest.Builder
setRequestOptions(RequestOptions.Builder builderForValue)
Common options for this request.ExecuteSqlRequest.Builder
setResumeToken(com.google.protobuf.ByteString value)
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.ExecuteSqlRequest.Builder
setSeqno(long value)
A per-transaction sequence number used to identify this request.ExecuteSqlRequest.Builder
setSession(String value)
Required.ExecuteSqlRequest.Builder
setSessionBytes(com.google.protobuf.ByteString value)
Required.ExecuteSqlRequest.Builder
setSql(String value)
Required.ExecuteSqlRequest.Builder
setSqlBytes(com.google.protobuf.ByteString value)
Required.ExecuteSqlRequest.Builder
setTransaction(TransactionSelector value)
The transaction to use.ExecuteSqlRequest.Builder
setTransaction(TransactionSelector.Builder builderForValue)
The transaction to use.ExecuteSqlRequest.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
clear
public ExecuteSqlRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
getDefaultInstanceForType
public ExecuteSqlRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ExecuteSqlRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ExecuteSqlRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ExecuteSqlRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
setField
public ExecuteSqlRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
clearField
public ExecuteSqlRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
clearOneof
public ExecuteSqlRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
setRepeatedField
public ExecuteSqlRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
addRepeatedField
public ExecuteSqlRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
mergeFrom
public ExecuteSqlRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ExecuteSqlRequest.Builder>
-
mergeFrom
public ExecuteSqlRequest.Builder mergeFrom(ExecuteSqlRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
mergeFrom
public ExecuteSqlRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ExecuteSqlRequest.Builder>
- Throws:
IOException
-
getSession
public String getSession()
Required. The session in which the SQL query should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Specified by:
getSession
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The session.
-
getSessionBytes
public com.google.protobuf.ByteString getSessionBytes()
Required. The session in which the SQL query should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Specified by:
getSessionBytes
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The bytes for session.
-
setSession
public ExecuteSqlRequest.Builder setSession(String value)
Required. The session in which the SQL query should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Parameters:
value
- The session to set.- Returns:
- This builder for chaining.
-
clearSession
public ExecuteSqlRequest.Builder clearSession()
Required. The session in which the SQL query should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Returns:
- This builder for chaining.
-
setSessionBytes
public ExecuteSqlRequest.Builder setSessionBytes(com.google.protobuf.ByteString value)
Required. The session in which the SQL query should be performed.
string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Parameters:
value
- The bytes for session to set.- Returns:
- This builder for chaining.
-
hasTransaction
public boolean hasTransaction()
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
- Specified by:
hasTransaction
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- Whether the transaction field is set.
-
getTransaction
public TransactionSelector getTransaction()
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
- Specified by:
getTransaction
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The transaction.
-
setTransaction
public ExecuteSqlRequest.Builder setTransaction(TransactionSelector value)
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
-
setTransaction
public ExecuteSqlRequest.Builder setTransaction(TransactionSelector.Builder builderForValue)
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
-
mergeTransaction
public ExecuteSqlRequest.Builder mergeTransaction(TransactionSelector value)
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
-
clearTransaction
public ExecuteSqlRequest.Builder clearTransaction()
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
-
getTransactionBuilder
public TransactionSelector.Builder getTransactionBuilder()
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
-
getTransactionOrBuilder
public TransactionSelectorOrBuilder getTransactionOrBuilder()
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 read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
.google.spanner.v1.TransactionSelector transaction = 2;
- Specified by:
getTransactionOrBuilder
in interfaceExecuteSqlRequestOrBuilder
-
getSql
public String getSql()
Required. The SQL string.
string sql = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getSql
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The sql.
-
getSqlBytes
public com.google.protobuf.ByteString getSqlBytes()
Required. The SQL string.
string sql = 3 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getSqlBytes
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The bytes for sql.
-
setSql
public ExecuteSqlRequest.Builder setSql(String value)
Required. The SQL string.
string sql = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The sql to set.- Returns:
- This builder for chaining.
-
clearSql
public ExecuteSqlRequest.Builder clearSql()
Required. The SQL string.
string sql = 3 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
setSqlBytes
public ExecuteSqlRequest.Builder setSqlBytes(com.google.protobuf.ByteString value)
Required. The SQL string.
string sql = 3 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes for sql to set.- Returns:
- This builder for chaining.
-
hasParams
public boolean hasParams()
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
- Specified by:
hasParams
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- Whether the params field is set.
-
getParams
public com.google.protobuf.Struct getParams()
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
- Specified by:
getParams
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The params.
-
setParams
public ExecuteSqlRequest.Builder setParams(com.google.protobuf.Struct value)
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
-
setParams
public ExecuteSqlRequest.Builder setParams(com.google.protobuf.Struct.Builder builderForValue)
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
-
mergeParams
public ExecuteSqlRequest.Builder mergeParams(com.google.protobuf.Struct value)
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
-
clearParams
public ExecuteSqlRequest.Builder clearParams()
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
-
getParamsBuilder
public com.google.protobuf.Struct.Builder getParamsBuilder()
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
-
getParamsOrBuilder
public com.google.protobuf.StructOrBuilder getParamsOrBuilder()
Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. 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 a SQL statement with unbound parameters.
.google.protobuf.Struct params = 4;
- Specified by:
getParamsOrBuilder
in interfaceExecuteSqlRequestOrBuilder
-
getParamTypesCount
public int getParamTypesCount()
Description copied from interface:ExecuteSqlRequestOrBuilder
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;
- Specified by:
getParamTypesCount
in interfaceExecuteSqlRequestOrBuilder
-
containsParamTypes
public 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;
- Specified by:
containsParamTypes
in interfaceExecuteSqlRequestOrBuilder
-
getParamTypes
@Deprecated public Map<String,Type> getParamTypes()
Deprecated.UsegetParamTypesMap()
instead.- Specified by:
getParamTypes
in interfaceExecuteSqlRequestOrBuilder
-
getParamTypesMap
public 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;
- Specified by:
getParamTypesMap
in interfaceExecuteSqlRequestOrBuilder
-
getParamTypesOrDefault
public 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;
- Specified by:
getParamTypesOrDefault
in interfaceExecuteSqlRequestOrBuilder
-
getParamTypesOrThrow
public 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;
- Specified by:
getParamTypesOrThrow
in interfaceExecuteSqlRequestOrBuilder
-
clearParamTypes
public ExecuteSqlRequest.Builder clearParamTypes()
-
removeParamTypes
public ExecuteSqlRequest.Builder removeParamTypes(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;
-
getMutableParamTypes
@Deprecated public Map<String,Type> getMutableParamTypes()
Deprecated.Use alternate mutation accessors instead.
-
putParamTypes
public ExecuteSqlRequest.Builder putParamTypes(String key, Type value)
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;
-
putAllParamTypes
public ExecuteSqlRequest.Builder putAllParamTypes(Map<String,Type> values)
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;
-
getResumeToken
public 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;
- Specified by:
getResumeToken
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The resumeToken.
-
setResumeToken
public ExecuteSqlRequest.Builder setResumeToken(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The resumeToken to set.- Returns:
- This builder for chaining.
-
clearResumeToken
public ExecuteSqlRequest.Builder clearResumeToken()
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;
- Returns:
- This builder for chaining.
-
getQueryModeValue
public 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;
- Specified by:
getQueryModeValue
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The enum numeric value on the wire for queryMode.
-
setQueryModeValue
public ExecuteSqlRequest.Builder setQueryModeValue(int value)
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;
- Parameters:
value
- The enum numeric value on the wire for queryMode to set.- Returns:
- This builder for chaining.
-
getQueryMode
public 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;
- Specified by:
getQueryMode
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The queryMode.
-
setQueryMode
public ExecuteSqlRequest.Builder setQueryMode(ExecuteSqlRequest.QueryMode value)
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;
- Parameters:
value
- The queryMode to set.- Returns:
- This builder for chaining.
-
clearQueryMode
public ExecuteSqlRequest.Builder clearQueryMode()
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;
- Returns:
- This builder for chaining.
-
getPartitionToken
public 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;
- Specified by:
getPartitionToken
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The partitionToken.
-
setPartitionToken
public ExecuteSqlRequest.Builder setPartitionToken(com.google.protobuf.ByteString value)
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;
- Parameters:
value
- The partitionToken to set.- Returns:
- This builder for chaining.
-
clearPartitionToken
public ExecuteSqlRequest.Builder clearPartitionToken()
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;
- Returns:
- This builder for chaining.
-
getSeqno
public long getSeqno()
A per-transaction sequence number used to identify this request. This field 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;
- Specified by:
getSeqno
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The seqno.
-
setSeqno
public ExecuteSqlRequest.Builder setSeqno(long value)
A per-transaction sequence number used to identify this request. This field 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;
- Parameters:
value
- The seqno to set.- Returns:
- This builder for chaining.
-
clearSeqno
public ExecuteSqlRequest.Builder clearSeqno()
A per-transaction sequence number used to identify this request. This field 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;
- Returns:
- This builder for chaining.
-
hasQueryOptions
public boolean hasQueryOptions()
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
- Specified by:
hasQueryOptions
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- Whether the queryOptions field is set.
-
getQueryOptions
public ExecuteSqlRequest.QueryOptions getQueryOptions()
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
- Specified by:
getQueryOptions
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The queryOptions.
-
setQueryOptions
public ExecuteSqlRequest.Builder setQueryOptions(ExecuteSqlRequest.QueryOptions value)
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
-
setQueryOptions
public ExecuteSqlRequest.Builder setQueryOptions(ExecuteSqlRequest.QueryOptions.Builder builderForValue)
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
-
mergeQueryOptions
public ExecuteSqlRequest.Builder mergeQueryOptions(ExecuteSqlRequest.QueryOptions value)
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
-
clearQueryOptions
public ExecuteSqlRequest.Builder clearQueryOptions()
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
-
getQueryOptionsBuilder
public ExecuteSqlRequest.QueryOptions.Builder getQueryOptionsBuilder()
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
-
getQueryOptionsOrBuilder
public ExecuteSqlRequest.QueryOptionsOrBuilder getQueryOptionsOrBuilder()
Query optimizer configuration to use for the given query.
.google.spanner.v1.ExecuteSqlRequest.QueryOptions query_options = 10;
- Specified by:
getQueryOptionsOrBuilder
in interfaceExecuteSqlRequestOrBuilder
-
hasRequestOptions
public boolean hasRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
- Specified by:
hasRequestOptions
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- Whether the requestOptions field is set.
-
getRequestOptions
public RequestOptions getRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
- Specified by:
getRequestOptions
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The requestOptions.
-
setRequestOptions
public ExecuteSqlRequest.Builder setRequestOptions(RequestOptions value)
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
-
setRequestOptions
public ExecuteSqlRequest.Builder setRequestOptions(RequestOptions.Builder builderForValue)
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
-
mergeRequestOptions
public ExecuteSqlRequest.Builder mergeRequestOptions(RequestOptions value)
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
-
clearRequestOptions
public ExecuteSqlRequest.Builder clearRequestOptions()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
-
getRequestOptionsBuilder
public RequestOptions.Builder getRequestOptionsBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
-
getRequestOptionsOrBuilder
public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
Common options for this request.
.google.spanner.v1.RequestOptions request_options = 11;
- Specified by:
getRequestOptionsOrBuilder
in interfaceExecuteSqlRequestOrBuilder
-
getDataBoostEnabled
public boolean getDataBoostEnabled()
If this is for a partitioned query and this field is set to `true`, the request will be executed via Spanner independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API will return an `INVALID_ARGUMENT` error.
bool data_boost_enabled = 16;
- Specified by:
getDataBoostEnabled
in interfaceExecuteSqlRequestOrBuilder
- Returns:
- The dataBoostEnabled.
-
setDataBoostEnabled
public ExecuteSqlRequest.Builder setDataBoostEnabled(boolean value)
If this is for a partitioned query and this field is set to `true`, the request will be executed via Spanner independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API will return an `INVALID_ARGUMENT` error.
bool data_boost_enabled = 16;
- Parameters:
value
- The dataBoostEnabled to set.- Returns:
- This builder for chaining.
-
clearDataBoostEnabled
public ExecuteSqlRequest.Builder clearDataBoostEnabled()
If this is for a partitioned query and this field is set to `true`, the request will be executed via Spanner independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API will return an `INVALID_ARGUMENT` error.
bool data_boost_enabled = 16;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final ExecuteSqlRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
mergeUnknownFields
public final ExecuteSqlRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ExecuteSqlRequest.Builder>
-
-