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
- (::Google::Cloud::Firestore::V1::Cursor) — A end point for the query results.
#end_at=
def end_at=(value) -> ::Google::Cloud::Firestore::V1::Cursor
- value (::Google::Cloud::Firestore::V1::Cursor) — A end point for the query results.
- (::Google::Cloud::Firestore::V1::Cursor) — A end point for the query results.
#from
def from() -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>
- (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>) — The collections to query.
#from=
def from=(value) -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>
- value (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>) — The collections to query.
- (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>) — The collections to query.
#limit
def limit() -> ::Google::Protobuf::Int32Value
-
(::Google::Protobuf::Int32Value) — The maximum number of results to return.
Applies after all other constraints. Must be >= 0 if specified.
#limit=
def limit=(value) -> ::Google::Protobuf::Int32Value
-
value (::Google::Protobuf::Int32Value) — The maximum number of results to return.
Applies after all other constraints. Must be >= 0 if specified.
-
(::Google::Protobuf::Int32Value) — The maximum number of results to return.
Applies after all other constraints. Must be >= 0 if specified.
#offset
def offset() -> ::Integer
-
(::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
-
value (::Integer) — The number of results to skip.
Applies before limit, but after all other constraints. Must be >= 0 if specified.
-
(::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>
-
(::Array<::Google::Cloud::Firestore::V1::StructuredQuery::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__
- Any field required to appear in
#order_by=
def order_by=(value) -> ::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>
-
value (::Array<::Google::Cloud::Firestore::V1::StructuredQuery::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__
- Any field required to appear in
-
(::Array<::Google::Cloud::Firestore::V1::StructuredQuery::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__
- Any field required to appear in
#select
def select() -> ::Google::Cloud::Firestore::V1::StructuredQuery::Projection
- (::Google::Cloud::Firestore::V1::StructuredQuery::Projection) — The projection to return.
#select=
def select=(value) -> ::Google::Cloud::Firestore::V1::StructuredQuery::Projection
- value (::Google::Cloud::Firestore::V1::StructuredQuery::Projection) — The projection to return.
- (::Google::Cloud::Firestore::V1::StructuredQuery::Projection) — The projection to return.
#start_at
def start_at() -> ::Google::Cloud::Firestore::V1::Cursor
- (::Google::Cloud::Firestore::V1::Cursor) — A starting point for the query results.
#start_at=
def start_at=(value) -> ::Google::Cloud::Firestore::V1::Cursor
- value (::Google::Cloud::Firestore::V1::Cursor) — A starting point for the query results.
- (::Google::Cloud::Firestore::V1::Cursor) — A starting point for the query results.
#where
def where() -> ::Google::Cloud::Firestore::V1::StructuredQuery::Filter
- (::Google::Cloud::Firestore::V1::StructuredQuery::Filter) — The filter to apply.
#where=
def where=(value) -> ::Google::Cloud::Firestore::V1::StructuredQuery::Filter
- value (::Google::Cloud::Firestore::V1::StructuredQuery::Filter) — The filter to apply.
- (::Google::Cloud::Firestore::V1::StructuredQuery::Filter) — The filter to apply.