Struct google_api_proto::google::firestore::v1beta1::StructuredQuery
source · pub struct StructuredQuery {
pub select: Option<Projection>,
pub from: Vec<CollectionSelector>,
pub where: Option<Filter>,
pub order_by: Vec<Order>,
pub start_at: Option<Cursor>,
pub end_at: Option<Cursor>,
pub offset: i32,
pub limit: Option<i32>,
}
Expand description
A Firestore query.
Fields§
§select: Option<Projection>
The projection to return.
from: Vec<CollectionSelector>
The collections to query.
where: Option<Filter>
The filter to apply.
order_by: Vec<Order>
The order to apply to the query results.
Firestore guarantees a stable ordering through the following rules:
- Any field required to appear in
order_by
, that is not already specified inorder_by
, is appended to the order in field name order by default. - If an order on
__name__
is not specified, it is appended by default.
Fields are appended with the same sort direction as the last order specified, or ‘ASCENDING’ if no order was specified. For example:
SELECT * FROM Foo ORDER BY A
becomesSELECT * FROM Foo ORDER BY A, __name__
SELECT * FROM Foo ORDER BY A DESC
becomesSELECT * FROM Foo ORDER BY A DESC, __name__ DESC
SELECT * FROM Foo WHERE A > 1
becomesSELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__
start_at: Option<Cursor>
A starting point for the query results.
end_at: Option<Cursor>
A end point for the query results.
offset: i32
The number of results to skip.
Applies before limit, but after all other constraints. Must be >= 0 if specified.
limit: Option<i32>
The maximum number of results to return.
Applies after all other constraints. Must be >= 0 if specified.
Trait Implementations§
source§impl Clone for StructuredQuery
impl Clone for StructuredQuery
source§fn clone(&self) -> StructuredQuery
fn clone(&self) -> StructuredQuery
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StructuredQuery
impl Debug for StructuredQuery
source§impl Default for StructuredQuery
impl Default for StructuredQuery
source§impl Message for StructuredQuery
impl Message for StructuredQuery
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for StructuredQuery
impl PartialEq for StructuredQuery
source§fn eq(&self, other: &StructuredQuery) -> bool
fn eq(&self, other: &StructuredQuery) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for StructuredQuery
Auto Trait Implementations§
impl !Freeze for StructuredQuery
impl RefUnwindSafe for StructuredQuery
impl Send for StructuredQuery
impl Sync for StructuredQuery
impl Unpin for StructuredQuery
impl UnwindSafe for StructuredQuery
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
Mutably borrows from an owned value. Read more
§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>
Wrap the input message
T
in a tonic::Request