From 88229949acae2f5ffe6ae34adc36a1ef01f3e981 Mon Sep 17 00:00:00 2001 From: Brian Chen Date: Fri, 31 Jul 2020 16:17:47 -0500 Subject: [PATCH] add IS_NOT_NULL and IS_NOT_NAN --- .../src/protos/firestore_proto_api.d.ts | 6 +++++- .../protos/google/firestore/v1/query.proto | 20 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/firestore/src/protos/firestore_proto_api.d.ts b/packages/firestore/src/protos/firestore_proto_api.d.ts index ab9df59a018..3895fda5d41 100644 --- a/packages/firestore/src/protos/firestore_proto_api.d.ts +++ b/packages/firestore/src/protos/firestore_proto_api.d.ts @@ -126,11 +126,15 @@ export declare const TargetChangeTargetChangeTypeEnum: ITargetChangeTargetChange export declare type UnaryFilterOp = | 'OPERATOR_UNSPECIFIED' | 'IS_NAN' - | 'IS_NULL'; + | 'IS_NULL' + | 'IS_NOT_NAN' + | 'IS_NOT_NULL'; export interface IUnaryFilterOpEnum { OPERATOR_UNSPECIFIED: UnaryFilterOp; IS_NAN: UnaryFilterOp; IS_NULL: UnaryFilterOp; + IS_NOT_NAN: UnaryFilterOp; + IS_NOT_NULL: UnaryFilterOp; values(): UnaryFilterOp[]; } export declare const UnaryFilterOpEnum: IUnaryFilterOpEnum; diff --git a/packages/firestore/src/protos/google/firestore/v1/query.proto b/packages/firestore/src/protos/google/firestore/v1/query.proto index a85010f4305..4f648e24372 100644 --- a/packages/firestore/src/protos/google/firestore/v1/query.proto +++ b/packages/firestore/src/protos/google/firestore/v1/query.proto @@ -172,11 +172,27 @@ message StructuredQuery { // Unspecified. This value must not be used. OPERATOR_UNSPECIFIED = 0; - // Test if a field is equal to NaN. + // The given `field` is equal to `NaN`. IS_NAN = 2; - // Test if an exprestion evaluates to Null. + // The given `field` is equal to `NULL`. IS_NULL = 3; + + // The given `field` is not equal to `NaN`. + // + // Requires: + // + // * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + // * That `field` comes first in the `order_by`. + IS_NOT_NAN = 4; + + // The given `field` is not equal to `NULL`. + // + // Requires: + // + // * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + // * That `field` comes first in the `order_by`. + IS_NOT_NULL = 5; } // The unary operator to apply.