Skip to content

Commit 924aaa2

Browse files
author
Brian Chen
authored
add protos for != queries (#1856)
1 parent c277074 commit 924aaa2

File tree

1 file changed

+77
-19
lines changed
  • firebase-firestore/src/proto/google/firestore/v1

1 file changed

+77
-19
lines changed

firebase-firestore/src/proto/google/firestore/v1/query.proto

Lines changed: 77 additions & 19 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.
@@ -127,14 +169,30 @@ message StructuredQuery {
127169
message UnaryFilter {
128170
// A unary operator.
129171
enum Operator {
130-
// Unspecified. This value must not be used.
131-
OPERATOR_UNSPECIFIED = 0;
132-
133-
// Test if a field is equal to NaN.
134-
IS_NAN = 2;
135-
136-
// Test if an exprestion evaluates to Null.
137-
IS_NULL = 3;
172+
// Unspecified. This value must not be used.
173+
OPERATOR_UNSPECIFIED = 0;
174+
175+
// The given `field` is equal to `NaN`.
176+
IS_NAN = 2;
177+
178+
// The given `field` is equal to `NULL`.
179+
IS_NULL = 3;
180+
181+
// The given `field` is not equal to `NaN`.
182+
//
183+
// Requires:
184+
//
185+
// * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
186+
// * That `field` comes first in the `order_by`.
187+
IS_NOT_NAN = 4;
188+
189+
// The given `field` is not equal to `NULL`.
190+
//
191+
// Requires:
192+
//
193+
// * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`.
194+
// * That `field` comes first in the `order_by`.
195+
IS_NOT_NULL = 5;
138196
}
139197

140198
// The unary operator to apply.

0 commit comments

Comments
 (0)