Cloud Firestore V1 API - Class Google::Cloud::Firestore::V1::StructuredQuery (v0.7.1)

Reference documentation and code samples for the Cloud Firestore V1 API class Google::Cloud::Firestore::V1::StructuredQuery.

A Firestore query.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#end_at

def end_at() -> ::Google::Cloud::Firestore::V1::Cursor
Returns

#end_at=

def end_at=(value) -> ::Google::Cloud::Firestore::V1::Cursor
Parameter
Returns

#from

def from() -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>
Returns

#from=

def from=(value) -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>
Parameter
Returns

#limit

def limit() -> ::Google::Protobuf::Int32Value
Returns

#limit=

def limit=(value) -> ::Google::Protobuf::Int32Value
Parameter
Returns

#offset

def offset() -> ::Integer
Returns
  • (::Integer) — The number of results to skip.

    Applies before limit, but after all other constraints. Must be >= 0 if specified.

#offset=

def offset=(value) -> ::Integer
Parameter
  • value (::Integer) — The number of results to skip.

    Applies before limit, but after all other constraints. Must be >= 0 if specified.

Returns
  • (::Integer) — The number of results to skip.

    Applies before limit, but after all other constraints. Must be >= 0 if specified.

#order_by

def order_by() -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>
Returns
  • (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>) —

    The order to apply to the query results.

    Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules:

    • The order_by is required to reference all fields used with an inequality filter.
    • All fields that are required to be in the order_by but are not already present are appended in lexicographical ordering of the field name.
    • 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:

    • ORDER BY a becomes ORDER BY a ASC, __name__ ASC
    • ORDER BY a DESC becomes ORDER BY a DESC, __name__ DESC
    • WHERE a > 1 becomes WHERE a > 1 ORDER BY a ASC, __name__ ASC
    • WHERE __name__ > ... AND a > 1 becomes WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC

#order_by=

def order_by=(value) -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>
Parameter
  • value (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>) —

    The order to apply to the query results.

    Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules:

    • The order_by is required to reference all fields used with an inequality filter.
    • All fields that are required to be in the order_by but are not already present are appended in lexicographical ordering of the field name.
    • 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:

    • ORDER BY a becomes ORDER BY a ASC, __name__ ASC
    • ORDER BY a DESC becomes ORDER BY a DESC, __name__ DESC
    • WHERE a > 1 becomes WHERE a > 1 ORDER BY a ASC, __name__ ASC
    • WHERE __name__ > ... AND a > 1 becomes WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC
Returns
  • (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>) —

    The order to apply to the query results.

    Firestore allows callers to provide a full ordering, a partial ordering, or no ordering at all. In all cases, Firestore guarantees a stable ordering through the following rules:

    • The order_by is required to reference all fields used with an inequality filter.
    • All fields that are required to be in the order_by but are not already present are appended in lexicographical ordering of the field name.
    • 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:

    • ORDER BY a becomes ORDER BY a ASC, __name__ ASC
    • ORDER BY a DESC becomes ORDER BY a DESC, __name__ DESC
    • WHERE a > 1 becomes WHERE a > 1 ORDER BY a ASC, __name__ ASC
    • WHERE __name__ > ... AND a > 1 becomes WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC

#select

def select() -> ::Google::Cloud::Firestore::V1::StructuredQuery::Projection
Returns

#select=

def select=(value) -> ::Google::Cloud::Firestore::V1::StructuredQuery::Projection
Parameter
Returns

#start_at

def start_at() -> ::Google::Cloud::Firestore::V1::Cursor
Returns

#start_at=

def start_at=(value) -> ::Google::Cloud::Firestore::V1::Cursor
Parameter
Returns

#where

def where() -> ::Google::Cloud::Firestore::V1::StructuredQuery::Filter
Returns

#where=

def where=(value) -> ::Google::Cloud::Firestore::V1::StructuredQuery::Filter
Parameter
Returns