File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
packages/firestore/src/local Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ import { dbDocumentSize } from './indexeddb_mutation_batch_impl';
3939import {
4040 DbRemoteDocument ,
4141 DbRemoteDocumentType ,
42- DbRemoteDocumentGlobal
42+ DbRemoteDocumentGlobal ,
43+ DbRemoteDocumentCollectionIndexKey
4344} from './indexeddb_schema' ;
4445import {
4546 DbRemoteDocumentCollectionGroupIndex ,
@@ -289,7 +290,7 @@ class IndexedDbRemoteDocumentCacheImpl implements IndexedDbRemoteDocumentCache {
289290 context ?: QueryContext
290291 ) : PersistencePromise < MutableDocumentMap > {
291292 const collection = query . path ;
292- const startKey = [
293+ const startKey : DbRemoteDocumentCollectionIndexKey = [
293294 DbRemoteDocumentType . FoundDocument ,
294295 collection . popLast ( ) . toArray ( ) ,
295296 collection . lastSegment ( ) ,
@@ -298,7 +299,7 @@ class IndexedDbRemoteDocumentCacheImpl implements IndexedDbRemoteDocumentCache {
298299 ? ''
299300 : offset . documentKey . path . lastSegment ( )
300301 ] ;
301- const endKey = [
302+ const endKey : DbRemoteDocumentCollectionIndexKey = [
302303 DbRemoteDocumentType . FoundDocument ,
303304 collection . popLast ( ) . toArray ( ) ,
304305 collection . lastSegment ( ) ,
Original file line number Diff line number Diff line change @@ -272,6 +272,17 @@ export interface DbRemoteDocument {
272272 documentType : DbRemoteDocumentType ;
273273}
274274
275+ /**
276+ * A key in the `DbRemoteDocumentCollectionIndex` index.
277+ */
278+ export type DbRemoteDocumentCollectionIndexKey = [
279+ /** document type */ DbRemoteDocumentType ,
280+ /** path to collection */ string [ ] ,
281+ /** collection group */ string ,
282+ /** read time */ DbTimestampKey ,
283+ /** document ID */ string
284+ ] ;
285+
275286/**
276287 * Contains a single entry that has metadata about the remote document cache.
277288 */
You can’t perform that action at this time.
0 commit comments