Firebase Firestore Query Between Two Timestamps

后端 未结 3 1168
温柔的废话
温柔的废话 2021-01-16 12:16

I want to find events that are a on now and upcoming (next 30 days) but that are also not in the past.

When i run this as a cloud function, I get \"Cannot have inequ

3条回答
  •  天命终不由人
    2021-01-16 12:40

    From the docs:

    You can only perform range comparisons (<, <=, >, >=) on a single field, and you can include at most one array-contains or array-contains-any clause in a compound query:

    citiesRef.where("state", ">=", "CA").where("state", "<=", "IN");
    citiesRef.where("state", "==", "CA").where("population", ">", 1000000);
    

    https://firebase.google.com/docs/firestore/query-data/queries

提交回复
热议问题