Struct google_api_proto::google::spanner::v1::PartitionQueryRequest
source · pub struct PartitionQueryRequest {
pub session: String,
pub transaction: Option<TransactionSelector>,
pub sql: String,
pub params: Option<Struct>,
pub param_types: BTreeMap<String, Type>,
pub partition_options: Option<PartitionOptions>,
}
Expand description
The request for [PartitionQuery][google.spanner.v1.Spanner.PartitionQuery]
Fields§
§session: String
Required. The session used to create the partitions.
transaction: Option<TransactionSelector>
Read only snapshot transactions are supported, read/write and single use transactions are not.
sql: String
Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. For a query to be root partitionable, it needs to satisfy a few conditions. For example, if the query execution plan contains a distributed union operator, then it must be the first operator in the plan. For more information about other conditions, see Read data in parallel.
The query request must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a PartitionedDml transaction for large, partition-friendly DML operations.
params: Option<Struct>
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 can contain
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 a SQL statement with unbound parameters.
param_types: BTreeMap<String, Type>
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.PartitionQueryRequest.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.
partition_options: Option<PartitionOptions>
Additional options that affect how many partitions are created.
Trait Implementations§
source§impl Clone for PartitionQueryRequest
impl Clone for PartitionQueryRequest
source§fn clone(&self) -> PartitionQueryRequest
fn clone(&self) -> PartitionQueryRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PartitionQueryRequest
impl Debug for PartitionQueryRequest
source§impl Default for PartitionQueryRequest
impl Default for PartitionQueryRequest
source§impl Message for PartitionQueryRequest
impl Message for PartitionQueryRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for PartitionQueryRequest
impl PartialEq for PartitionQueryRequest
source§fn eq(&self, other: &PartitionQueryRequest) -> bool
fn eq(&self, other: &PartitionQueryRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PartitionQueryRequest
Auto Trait Implementations§
impl !Freeze for PartitionQueryRequest
impl RefUnwindSafe for PartitionQueryRequest
impl Send for PartitionQueryRequest
impl Sync for PartitionQueryRequest
impl Unpin for PartitionQueryRequest
impl UnwindSafe for PartitionQueryRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request