[][src]Function firestore_db_and_auth::documents::query

pub fn query<'a, T, BEARER>(
    auth: &'a mut BEARER,
    collectionid: &str,
    value: &str,
    operator: FieldOperator,
    field: &str
) -> Result<Vec<T>> where
    T: Deserialize<'b>,
    BEARER: FirebaseAuthBearer<'c>, 

Queries the database for specific documents, for example all documents in a collection of the 'type' == "car".

Please note that this API returns a vector of same-like documents. This method is not suitable if you want to query for different types of documents.

Arguments

  • 'auth' The authentication token
  • 'collectionid' The collection id; "my_collection" or "a/nested/collection"
  • 'value' The query / filter value. For example "car".
  • 'operator' The query operator. For example "EQUAL".
  • 'field' The query / filter field. For example "type".