Skip to content

Misleading/incorrect example for firestore querying #186

@sushantdhiman

Description

@sushantdhiman

Example from https://firebase.google.com/docs/firestore/query-data/queries#web-v8_4 is incorrect or misleading.

citiesRef.where("state", "==", "CA");
citiesRef.where("population", "<", 100000);
citiesRef.where("name", ">=", "San Francisco");

This example shows that you can chain query methods but it is incorrect. Query class is immutable, correct example will be

let citiesRef = firestore.collection('cities');

citiesRef = citiesRef.where("state", "==", "CA");
citiesRef = citiesRef.where("population", "<", 100000);
citiesRef = citiesRef.where("name", ">=", "San Francisco");

Please check this main issue googleapis/nodejs-firestore#483

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions