File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
packages/firestore/src/local Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -289,19 +289,19 @@ class IndexedDbRemoteDocumentCacheImpl implements IndexedDbRemoteDocumentCache {
289
289
) : PersistencePromise < MutableDocumentMap > {
290
290
const collection = query . path ;
291
291
const startKey : DbRemoteDocumentCollectionIndexKey = [
292
- MIN_CREATE_TIME ,
293
292
collection . popLast ( ) . toArray ( ) ,
294
293
collection . lastSegment ( ) ,
295
294
toDbTimestampKey ( offset . readTime ) ,
296
295
offset . documentKey . path . isEmpty ( )
297
296
? ''
298
- : offset . documentKey . path . lastSegment ( )
297
+ : offset . documentKey . path . lastSegment ( ) ,
298
+ ''
299
299
] ;
300
300
const endKey : DbRemoteDocumentCollectionIndexKey = [
301
- MAX_CREATE_TIME ,
302
301
collection . popLast ( ) . toArray ( ) ,
303
302
collection . lastSegment ( ) ,
304
303
[ Number . MAX_SAFE_INTEGER , Number . MAX_SAFE_INTEGER ] ,
304
+ '' ,
305
305
''
306
306
] ;
307
307
Original file line number Diff line number Diff line change @@ -199,11 +199,11 @@ export const DbRemoteDocumentCollectionGroupIndexPath = [
199
199
export const DbRemoteDocumentCollectionIndex = 'collectionIndex' ;
200
200
201
201
export const DbRemoteDocumentCollectionIndexPath = [
202
- 'document.createTime' ,
203
202
'prefixPath' ,
204
203
'collectionGroup' ,
205
204
'readTime' ,
206
- 'documentId'
205
+ 'documentId' ,
206
+ 'document.createTime'
207
207
] ;
208
208
209
209
export const MIN_CREATE_TIME = '' as const ;
@@ -218,11 +218,11 @@ export const MAX_CREATE_TIME = '\uFFFF' as const;
218
218
* filtering.
219
219
*/
220
220
export type DbRemoteDocumentCollectionIndexKey = [
221
- /** document.createTime */ typeof MIN_CREATE_TIME | typeof MAX_CREATE_TIME ,
222
221
/** path to collection */ string [ ] ,
223
222
/** collection group */ string ,
224
223
/** read time */ DbTimestampKey ,
225
- /** document ID */ string
224
+ /** document ID */ string ,
225
+ /** document.createTime */ typeof MIN_CREATE_TIME | typeof MAX_CREATE_TIME
226
226
] ;
227
227
228
228
export const DbRemoteDocumentGlobalStore = 'remoteDocumentGlobal' ;
You can’t perform that action at this time.
0 commit comments