Skip to content

Commit a4da342

Browse files
milaGGLdconeybe
authored andcommitted
Move mieq composite index tests (#5729)
1 parent 5b8d1ec commit a4da342

File tree

6 files changed

+879
-608
lines changed

6 files changed

+879
-608
lines changed

firebase-firestore/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [feature] Enable queries with range & inequality filters on multiple fields. [#5729](//github.com/firebase/firebase-android-sdk/pull/5729)
33

44
# 24.11.0
55
* [feature] Enable snapshot listener option to retrieve data from local cache only. [#5690](//github.com/firebase/firebase-android-sdk/pull/5690)

firebase-firestore/firestore_collection_group_index_config.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
locals {
216
collection_group_indexes = {
317
index1 = [

firebase-firestore/firestore_composite_index_config.tf

Lines changed: 259 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
locals {
216
indexes = {
317
index1 = [
@@ -101,6 +115,36 @@ locals {
101115
},
102116
]
103117
index9 = [
118+
{
119+
field_path = "testId"
120+
order = "ASCENDING"
121+
},
122+
{
123+
field_path = "a"
124+
order = "ASCENDING"
125+
},
126+
127+
{
128+
field_path = "b"
129+
order = "ASCENDING"
130+
},
131+
]
132+
index10 = [
133+
{
134+
field_path = "testId"
135+
order = "ASCENDING"
136+
},
137+
{
138+
field_path = "b"
139+
order = "DESCENDING"
140+
},
141+
142+
{
143+
field_path = "a"
144+
order = "DESCENDING"
145+
},
146+
]
147+
index11 = [
104148
{
105149
field_path = "testId"
106150
order = "ASCENDING"
@@ -114,7 +158,7 @@ locals {
114158
order = "ASCENDING"
115159
},
116160
]
117-
index10 = [
161+
index12 = [
118162
{
119163
field_path = "testId"
120164
order = "ASCENDING"
@@ -132,7 +176,7 @@ locals {
132176
order = "ASCENDING"
133177
},
134178
]
135-
index11 = [
179+
index13 = [
136180
{
137181
field_path = "rating"
138182
array_config = "CONTAINS"
@@ -150,5 +194,218 @@ locals {
150194
order = "ASCENDING"
151195
},
152196
]
197+
index14 = [
198+
{
199+
field_path = "testId"
200+
order = "ASCENDING"
201+
},
202+
{
203+
field_path = "key"
204+
order = "ASCENDING"
205+
},
206+
{
207+
field_path = "sort"
208+
order = "ASCENDING"
209+
}
210+
]
211+
index15 = [
212+
{
213+
field_path = "testId"
214+
order = "ASCENDING"
215+
},
216+
{
217+
field_path = "key"
218+
order = "ASCENDING"
219+
},
220+
{
221+
field_path = "sort"
222+
order = "ASCENDING"
223+
},
224+
{
225+
field_path = "v"
226+
order = "ASCENDING"
227+
}
228+
]
229+
index16 = [
230+
{
231+
field_path = "testId"
232+
order = "ASCENDING"
233+
},
234+
{
235+
field_path = "v"
236+
order = "DESCENDING"
237+
},
238+
{
239+
field_path = "key"
240+
order = "DESCENDING"
241+
},
242+
{
243+
field_path = "sort"
244+
order = "DESCENDING"
245+
},
246+
]
247+
index17 = [
248+
{
249+
field_path = "v"
250+
array_config = "CONTAINS"
251+
},
252+
{
253+
field_path = "testId"
254+
order = "ASCENDING"
255+
},
256+
{
257+
field_path = "key"
258+
order = "ASCENDING"
259+
},
260+
{
261+
field_path = "sort"
262+
order = "ASCENDING"
263+
},
264+
]
265+
index18 = [
266+
{
267+
field_path = "key"
268+
order = "ASCENDING"
269+
},
270+
{
271+
field_path = "testId"
272+
order = "ASCENDING"
273+
},
274+
275+
{
276+
field_path = "sort"
277+
order = "DESCENDING"
278+
},
279+
{
280+
field_path = "v"
281+
order = "ASCENDING"
282+
},
283+
]
284+
index19 = [
285+
{
286+
field_path = "testId"
287+
order = "ASCENDING"
288+
},
289+
290+
{
291+
field_path = "sort"
292+
order = "DESCENDING"
293+
},
294+
{
295+
field_path = "key"
296+
order = "ASCENDING"
297+
},
298+
{
299+
field_path = "v"
300+
order = "ASCENDING"
301+
},
302+
]
303+
index20 = [
304+
{
305+
field_path = "testId"
306+
order = "ASCENDING"
307+
},
308+
{
309+
field_path = "v"
310+
order = "ASCENDING"
311+
},
312+
313+
{
314+
field_path = "sort"
315+
order = "ASCENDING"
316+
},
317+
{
318+
field_path = "key"
319+
order = "ASCENDING"
320+
},
321+
322+
]
323+
index21 = [
324+
{
325+
field_path = "testId"
326+
order = "ASCENDING"
327+
},
328+
{
329+
field_path = "sort"
330+
order = "DESCENDING"
331+
},
332+
{
333+
field_path = "key"
334+
order = "DESCENDING"
335+
},
336+
337+
]
338+
index22 = [
339+
{
340+
field_path = "testId"
341+
order = "ASCENDING"
342+
},
343+
{
344+
field_path = "v"
345+
order = "DESCENDING"
346+
},
347+
{
348+
field_path = "sort"
349+
order = "ASCENDING"
350+
},
351+
{
352+
field_path = "key"
353+
order = "ASCENDING"
354+
},
355+
]
356+
index23 = [
357+
{
358+
field_path = "testId"
359+
order = "ASCENDING"
360+
},
361+
{
362+
field_path = "name"
363+
order = "ASCENDING"
364+
},
365+
{
366+
field_path = "metadata.createdAt"
367+
order = "ASCENDING"
368+
},
369+
]
370+
index24 = [
371+
{
372+
field_path = "testId"
373+
order = "ASCENDING"
374+
},
375+
{
376+
field_path = "name"
377+
order = "DESCENDING"
378+
},
379+
{
380+
field_path = "field"
381+
order = "DESCENDING"
382+
},
383+
{
384+
field_path = "`field.dot`"
385+
order = "DESCENDING"
386+
},
387+
{
388+
field_path = "`field\\\\slash`"
389+
order = "DESCENDING"
390+
},
391+
],
392+
index25 = [
393+
{
394+
field_path = "testId"
395+
order = "ASCENDING"
396+
},
397+
{
398+
field_path = "v"
399+
order = "ASCENDING"
400+
},
401+
{
402+
field_path = "key"
403+
order = "ASCENDING"
404+
},
405+
{
406+
field_path = "sort"
407+
order = "ASCENDING"
408+
},
409+
]
153410
}
154411
}

0 commit comments

Comments
 (0)