【问题标题】:Get records other than a string value with angularfirestore使用 angularfirestore 获取字符串值以外的记录
【发布时间】:2020-03-02 06:19:57
【问题描述】:

我需要构建一个字段值与字符串值不同的查询。

我查看了文档,无法理解如何在值不同的情况下进行查询。

angularfirestore我无法预约如下:

    this.db.collection('schedules').doc(id)
        .collection('values', ref => 
        ref.where('status', '!==', 'cancel');

我需要获取所有状态与取消不同的记录。

【问题讨论】:

标签: typescript firebase google-cloud-firestore angularfire


【解决方案1】:

在官方库中查看文档; https://github.com/angular/angularfire/blob/master/docs/firestore/querying-collections.md

基本上你必须遵循这个例子:

db.collection ('items', ref => ref.where ('size', '==', 'large'))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-12
    • 2017-06-13
    • 1970-01-01
    相关资源
    最近更新 更多