ExecuteSqlRequest
class ExecuteSqlRequest extends Message
The request for [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] and [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql].
Protobuf type Google\Spanner\V1\ExecuteSqlRequest
Methods
No description
Required. The session in which the SQL query should be performed.
Required. The session in which the SQL query should be performed.
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
Required. The SQL query string.
Required. The SQL query string.
The SQL query 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.
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.
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.
If this request is resuming a previously interrupted SQL query
execution, resume_token
should be copied from the last
[PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this
enables the new SQL query execution to resume where the last one left
off. The rest of the request parameters must exactly match the
request that yielded this token.
If this request is resuming a previously interrupted SQL query
execution, resume_token
should be copied from the last
[PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this
enables the new SQL query execution to resume where the last one left
off. The rest of the request parameters must exactly match the
request that yielded this token.
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].
Details
at line 85
__construct()
at line 96
string
getSession()
Required. The session in which the SQL query should be performed.
Generated from protobuf field string session = 1;
at line 107
setSession(string $var)
Required. The session in which the SQL query should be performed.
Generated from protobuf field string session = 1;
at line 120
TransactionSelector
getTransaction()
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
Generated from protobuf field .google.spanner.v1.TransactionSelector transaction = 2;
at line 132
setTransaction(TransactionSelector $var)
The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency.
Generated from protobuf field .google.spanner.v1.TransactionSelector transaction = 2;
at line 144
string
getSql()
Required. The SQL query string.
Generated from protobuf field string sql = 3;
at line 155
setSql(string $var)
Required. The SQL query string.
Generated from protobuf field string sql = 3;
at line 177
Struct
getParams()
The SQL query 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 query 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.
Generated from protobuf field .google.protobuf.Struct params = 4;
at line 198
setParams(Struct $var)
The SQL query 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 query 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.
Generated from protobuf field .google.protobuf.Struct params = 4;
at line 216
RepeatedField
getParamTypes()
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 query parameters. See the
definition of [Type][google.spanner.v1.Type] for more information
about SQL types.
Generated from protobuf field map<string, .google.spanner.v1.Type> param_types = 5;
at line 233
setParamTypes(array|RepeatedField $var)
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 query parameters. See the
definition of [Type][google.spanner.v1.Type] for more information
about SQL types.
Generated from protobuf field map<string, .google.spanner.v1.Type> param_types = 5;
at line 250
string
getResumeToken()
If this request is resuming a previously interrupted SQL query
execution, resume_token
should be copied from the last
[PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this
enables the new SQL query execution to resume where the last one left
off. The rest of the request parameters must exactly match the
request that yielded this token.
Generated from protobuf field bytes resume_token = 6;
at line 266
setResumeToken(string $var)
If this request is resuming a previously interrupted SQL query
execution, resume_token
should be copied from the last
[PartialResultSet][google.spanner.v1.PartialResultSet] yielded before the interruption. Doing this
enables the new SQL query execution to resume where the last one left
off. The rest of the request parameters must exactly match the
request that yielded this token.
Generated from protobuf field bytes resume_token = 6;
at line 279
int
getQueryMode()
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].
Generated from protobuf field .google.spanner.v1.ExecuteSqlRequest.QueryMode query_mode = 7;
at line 291
setQueryMode(int $var)
Used to control the amount of debugging information returned in [ResultSetStats][google.spanner.v1.ResultSetStats].
Generated from protobuf field .google.spanner.v1.ExecuteSqlRequest.QueryMode query_mode = 7;