Skip to content

add IS_NOT_NULL and IS_NOT_NAN protos #3533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/firestore/src/protos/firestore_proto_api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 18 additions & 2 deletions packages/firestore/src/protos/google/firestore/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down