Skip to content

Commit 2bc2621

Browse files
author
Brian Chen
authored
add not equal proto (#3528)
1 parent 458f8b7 commit 2bc2621

File tree

2 files changed

+61
-15
lines changed

2 files changed

+61
-15
lines changed

packages/firestore/src/protos/firestore_proto_api.d.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*/
1717

1818
// Rather than pull these in from other protos, we just alias them to any.
19-
/*
19+
/*
2020
eslint-disable
21-
camelcase, @typescript-eslint/no-explicit-any,
22-
@typescript-eslint/interface-name-prefix, @typescript-eslint/class-name-casing
21+
camelcase, @typescript-eslint/no-explicit-any,
22+
@typescript-eslint/interface-name-prefix, @typescript-eslint/class-name-casing
2323
*/
2424
export declare type ApiClientHookFactory = any;
2525
export declare type PromiseRequestService = any;
@@ -44,19 +44,23 @@ export declare type FieldFilterOp =
4444
| 'GREATER_THAN'
4545
| 'GREATER_THAN_OR_EQUAL'
4646
| 'EQUAL'
47+
| 'NOT_EQUAL'
4748
| 'ARRAY_CONTAINS'
4849
| 'IN'
49-
| 'ARRAY_CONTAINS_ANY';
50+
| 'ARRAY_CONTAINS_ANY'
51+
| 'NOT_IN';
5052
export interface IFieldFilterOpEnum {
5153
OPERATOR_UNSPECIFIED: FieldFilterOp;
5254
LESS_THAN: FieldFilterOp;
5355
LESS_THAN_OR_EQUAL: FieldFilterOp;
5456
GREATER_THAN: FieldFilterOp;
5557
GREATER_THAN_OR_EQUAL: FieldFilterOp;
5658
EQUAL: FieldFilterOp;
59+
NOT_EQUAL: FieldFilterOp;
5760
ARRAY_CONTAINS: FieldFilterOp;
5861
IN: FieldFilterOp;
5962
ARRAY_CONTAINS_ANY: FieldFilterOp;
63+
NOT_IN: FieldFilterOp;
6064
values(): FieldFilterOp[];
6165
}
6266
export declare const FieldFilterOpEnum: IFieldFilterOpEnum;

packages/firestore/src/protos/google/firestore/v1/query.proto

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,74 @@ message StructuredQuery {
8585
// Unspecified. This value must not be used.
8686
OPERATOR_UNSPECIFIED = 0;
8787

88-
// Less than. Requires that the field come first in `order_by`.
88+
// The given `field` is less than the given `value`.
89+
//
90+
// Requires:
91+
//
92+
// * That `field` come first in `order_by`.
8993
LESS_THAN = 1;
9094

91-
// Less than or equal. Requires that the field come first in `order_by`.
95+
// The given `field` is less than or equal to the given `value`.
96+
//
97+
// Requires:
98+
//
99+
// * That `field` come first in `order_by`.
92100
LESS_THAN_OR_EQUAL = 2;
93101

94-
// Greater than. Requires that the field come first in `order_by`.
102+
// The given `field` is greater than the given `value`.
103+
//
104+
// Requires:
105+
//
106+
// * That `field` come first in `order_by`.
95107
GREATER_THAN = 3;
96108

97-
// Greater than or equal. Requires that the field come first in
98-
// `order_by`.
109+
// The given `field` is greater than or equal to the given `value`.
110+
//
111+
// Requires:
112+
//
113+
// * That `field` come first in `order_by`.
99114
GREATER_THAN_OR_EQUAL = 4;
100115

101-
// Equal.
116+
// The given `field` is equal to the given `value`..
102117
EQUAL = 5;
103118

104-
// Contains. Requires that the field is an array.
119+
// The given `field` is not equal to the given `value`.
120+
//
121+
// Requires:
122+
//
123+
// * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
124+
// * That `field` comes first in the `order_by`.
125+
NOT_EQUAL = 6;
126+
127+
// The given `field` is an array that contains the given `value`.
105128
ARRAY_CONTAINS = 7;
106129

107-
// In. Requires that `value` is a non-empty ArrayValue with at most 10
108-
// values.
130+
// The given `field` is equal to at least one value in the given array.
131+
//
132+
// Requires:
133+
//
134+
// * That `value` is a non-empty `ArrayValue` with at most 10 values.
135+
// * No other `IN` or `ARRAY_CONTAINS_ANY`. (-- or `NOT_IN` --)
109136
IN = 8;
110137

111-
// Contains any. Requires that the field is an array and
112-
// `value` is a non-empty ArrayValue with at most 10 values.
138+
// The given `field` is an array that contains any of the values in the
139+
// given array.
140+
//
141+
// Requires:
142+
//
143+
// * That `value` is a non-empty `ArrayValue` with at most 10 values.
144+
// * No other `IN` or `ARRAY_CONTAINS_ANY`. (-- or `NOT_IN` --)
113145
ARRAY_CONTAINS_ANY = 9;
146+
147+
// The value of the `field` is not in the given array.
148+
//
149+
// Requires:
150+
//
151+
// * That `value` is a non-empty `ArrayValue` with at most 10 values.
152+
// * No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`,
153+
// `IS_NOT_NULL`, or `IS_NOT_NAN`.
154+
// * That `field` comes first in the `order_by`.
155+
NOT_IN = 10;
114156
}
115157

116158
// The field to filter by.

0 commit comments

Comments
 (0)