@firebase/firestore 3.4.7-canary.e9e5f6b3c → 3.4.8-canary.38da5d9be
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/firestore/src/core/target.d.ts +2 -0
- package/dist/firestore/src/local/index_manager.d.ts +19 -3
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +3 -2
- package/dist/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/firestore/src/local/memory_index_manager.d.ts +2 -2
- package/dist/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/index.esm2017.js +2998 -2965
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3303 -3272
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +1575 -1508
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +1575 -1508
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3065 -3032
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +20 -3
- package/dist/lite/firestore/src/core/target.d.ts +2 -0
- package/dist/lite/firestore/src/local/index_manager.d.ts +19 -3
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +3 -2
- package/dist/lite/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/lite/firestore/src/local/memory_index_manager.d.ts +2 -2
- package/dist/lite/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/lite/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1112 -1112
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/src/core/target.d.ts +2 -0
- package/dist/lite/packages/firestore/src/local/index_manager.d.ts +19 -3
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +3 -2
- package/dist/lite/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +2 -2
- package/dist/lite/packages/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/lite/packages/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/packages/firestore/dist/index.esm2017.d.ts +53 -53
- package/dist/packages/firestore/src/core/target.d.ts +2 -0
- package/dist/packages/firestore/src/local/index_manager.d.ts +19 -3
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +3 -2
- package/dist/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/packages/firestore/src/local/memory_index_manager.d.ts +2 -2
- package/dist/packages/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/packages/firestore/test/unit/local/test_index_manager.d.ts +2 -2
- package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/private.d.ts +20 -3
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @firebase/firestore
|
|
2
2
|
|
|
3
|
+
## 3.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`05dc9d6a0`](https://github.com/firebase/firebase-js-sdk/commit/05dc9d6a0db3058611dd7a2dc34daa726f9ba20d) [#6128](https://github.com/firebase/firebase-js-sdk/pull/6128) (fixes [#6110](https://github.com/firebase/firebase-js-sdk/issues/6110)) - Fixes an issue during multi-document lookup that resulted in the IndexedDB error "The parameter is less than or equal to this cursor's".
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`e9e5f6b3c`](https://github.com/firebase/firebase-js-sdk/commit/e9e5f6b3ca9d61323b22f87986d9959f5297ec59)]:
|
|
10
|
+
- @firebase/util@1.5.2
|
|
11
|
+
- @firebase/component@0.5.13
|
|
12
|
+
|
|
3
13
|
## 3.4.7
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -82,6 +82,8 @@ export declare function targetGetLowerBound(target: Target, fieldIndex: FieldInd
|
|
|
82
82
|
* upper bound exists.
|
|
83
83
|
*/
|
|
84
84
|
export declare function targetGetUpperBound(target: Target, fieldIndex: FieldIndex): Bound | null;
|
|
85
|
+
/** Returns the number of segments of a perfect index for this target. */
|
|
86
|
+
export declare function targetGetSegmentCount(target: Target): number;
|
|
85
87
|
export declare abstract class Filter {
|
|
86
88
|
abstract matches(doc: Document): boolean;
|
|
87
89
|
}
|
|
@@ -21,6 +21,22 @@ import { FieldIndex, IndexOffset } from '../model/field_index';
|
|
|
21
21
|
import { ResourcePath } from '../model/path';
|
|
22
22
|
import { PersistencePromise } from './persistence_promise';
|
|
23
23
|
import { PersistenceTransaction } from './persistence_transaction';
|
|
24
|
+
/** Represents the index state as it relates to a particular target. */
|
|
25
|
+
export declare const enum IndexType {
|
|
26
|
+
/** Indicates that no index could be found for serving the target. */
|
|
27
|
+
NONE = 0,
|
|
28
|
+
/**
|
|
29
|
+
* Indicates that only a "partial index" could be found for serving the
|
|
30
|
+
* target. A partial index is one which does not have a segment for every
|
|
31
|
+
* filter/orderBy in the target.
|
|
32
|
+
*/
|
|
33
|
+
PARTIAL = 1,
|
|
34
|
+
/**
|
|
35
|
+
* Indicates that a "full index" could be found for serving the target. A full
|
|
36
|
+
* index is one which has a segment for every filter/orderBy in the target.
|
|
37
|
+
*/
|
|
38
|
+
FULL = 2
|
|
39
|
+
}
|
|
24
40
|
/**
|
|
25
41
|
* Represents a set of indexes that are used to execute queries efficiently.
|
|
26
42
|
*
|
|
@@ -68,10 +84,10 @@ export interface IndexManager {
|
|
|
68
84
|
/** Returns all configured field indexes. */
|
|
69
85
|
getFieldIndexes(transaction: PersistenceTransaction): PersistencePromise<FieldIndex[]>;
|
|
70
86
|
/**
|
|
71
|
-
* Returns
|
|
72
|
-
*
|
|
87
|
+
* Returns the type of index (if any) that can be used to serve the given
|
|
88
|
+
* target.
|
|
73
89
|
*/
|
|
74
|
-
|
|
90
|
+
getIndexType(transaction: PersistenceTransaction, target: Target): PersistencePromise<IndexType>;
|
|
75
91
|
/**
|
|
76
92
|
* Returns the documents that match the given target based on the provided
|
|
77
93
|
* index or `null` if the target does not have a matching index.
|
|
@@ -21,7 +21,7 @@ import { DocumentMap } from '../model/collections';
|
|
|
21
21
|
import { DocumentKey } from '../model/document_key';
|
|
22
22
|
import { FieldIndex, IndexOffset } from '../model/field_index';
|
|
23
23
|
import { ResourcePath } from '../model/path';
|
|
24
|
-
import { IndexManager } from './index_manager';
|
|
24
|
+
import { IndexManager, IndexType } from './index_manager';
|
|
25
25
|
import { PersistencePromise } from './persistence_promise';
|
|
26
26
|
import { PersistenceTransaction } from './persistence_transaction';
|
|
27
27
|
/**
|
|
@@ -75,7 +75,8 @@ export declare class IndexedDbIndexManager implements IndexManager {
|
|
|
75
75
|
* and user.
|
|
76
76
|
*/
|
|
77
77
|
private generateEmptyBound;
|
|
78
|
-
getFieldIndex
|
|
78
|
+
private getFieldIndex;
|
|
79
|
+
getIndexType(transaction: PersistenceTransaction, target: Target): PersistencePromise<IndexType>;
|
|
79
80
|
/**
|
|
80
81
|
* Returns the byte encoded form of the directional values in the field index.
|
|
81
82
|
* Returns `null` if the document does not have all fields specified in the
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { MutableDocument } from '../model/document';
|
|
18
|
+
import { DocumentKey } from '../model/document_key';
|
|
18
19
|
import { LocalSerializer } from './local_serializer';
|
|
19
20
|
import { RemoteDocumentCache } from './remote_document_cache';
|
|
20
21
|
export interface DocumentSizeEntry {
|
|
@@ -25,3 +26,11 @@ export interface IndexedDbRemoteDocumentCache extends RemoteDocumentCache {
|
|
|
25
26
|
}
|
|
26
27
|
/** Creates a new IndexedDbRemoteDocumentCache. */
|
|
27
28
|
export declare function newIndexedDbRemoteDocumentCache(serializer: LocalSerializer): IndexedDbRemoteDocumentCache;
|
|
29
|
+
/**
|
|
30
|
+
* Comparator that compares document keys according to the primary key sorting
|
|
31
|
+
* used by the `DbRemoteDocumentDocument` store (by prefix path, collection id
|
|
32
|
+
* and then document ID).
|
|
33
|
+
*
|
|
34
|
+
* Visible for testing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function dbKeyComparator(l: DocumentKey, r: DocumentKey): number;
|
|
@@ -19,7 +19,7 @@ import { DocumentMap } from '../model/collections';
|
|
|
19
19
|
import { DocumentKey } from '../model/document_key';
|
|
20
20
|
import { FieldIndex, IndexOffset } from '../model/field_index';
|
|
21
21
|
import { ResourcePath } from '../model/path';
|
|
22
|
-
import { IndexManager } from './index_manager';
|
|
22
|
+
import { IndexManager, IndexType } from './index_manager';
|
|
23
23
|
import { PersistencePromise } from './persistence_promise';
|
|
24
24
|
import { PersistenceTransaction } from './persistence_transaction';
|
|
25
25
|
/**
|
|
@@ -32,7 +32,7 @@ export declare class MemoryIndexManager implements IndexManager {
|
|
|
32
32
|
addFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
33
33
|
deleteFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
34
34
|
getDocumentsMatchingTarget(transaction: PersistenceTransaction, target: Target): PersistencePromise<DocumentKey[] | null>;
|
|
35
|
-
|
|
35
|
+
getIndexType(transaction: PersistenceTransaction, target: Target): PersistencePromise<IndexType>;
|
|
36
36
|
getFieldIndexes(transaction: PersistenceTransaction, collectionGroup?: string): PersistencePromise<FieldIndex[]>;
|
|
37
37
|
getNextCollectionGroupToUpdate(transaction: PersistenceTransaction): PersistencePromise<string | null>;
|
|
38
38
|
updateCollectionGroup(transaction: PersistenceTransaction, collectionGroup: string, offset: IndexOffset): PersistencePromise<void>;
|
|
@@ -186,6 +186,8 @@ export declare class SimpleDbStore<KeyType extends IDBValidKey, ValueType extend
|
|
|
186
186
|
loadAll(): PersistencePromise<ValueType[]>;
|
|
187
187
|
/** Loads all elements for the index range from the object store. */
|
|
188
188
|
loadAll(range: IDBKeyRange): PersistencePromise<ValueType[]>;
|
|
189
|
+
/** Loads all elements ordered by the given index. */
|
|
190
|
+
loadAll(index: string): PersistencePromise<ValueType[]>;
|
|
189
191
|
/**
|
|
190
192
|
* Loads all elements from the object store that fall into the provided in the
|
|
191
193
|
* index range for the given index.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { Target } from '../../../src/core/target';
|
|
18
|
-
import { IndexManager } from '../../../src/local/index_manager';
|
|
18
|
+
import { IndexManager, IndexType } from '../../../src/local/index_manager';
|
|
19
19
|
import { Persistence } from '../../../src/local/persistence';
|
|
20
20
|
import { DocumentMap } from '../../../src/model/collections';
|
|
21
21
|
import { DocumentKey } from '../../../src/model/document_key';
|
|
@@ -34,7 +34,7 @@ export declare class TestIndexManager {
|
|
|
34
34
|
addFieldIndex(index: FieldIndex): Promise<void>;
|
|
35
35
|
deleteFieldIndex(index: FieldIndex): Promise<void>;
|
|
36
36
|
getFieldIndexes(collectionGroup?: string): Promise<FieldIndex[]>;
|
|
37
|
-
|
|
37
|
+
getIndexType(target: Target): Promise<IndexType>;
|
|
38
38
|
getDocumentsMatchingTarget(target: Target): Promise<DocumentKey[] | null>;
|
|
39
39
|
getNextCollectionGroupToUpdate(): Promise<string | null>;
|
|
40
40
|
updateCollectionGroup(collectionGroup: string, offset: IndexOffset): Promise<void>;
|
|
@@ -47,10 +47,6 @@ export declare class TestRemoteDocumentCache {
|
|
|
47
47
|
getEntries(documentKeys: DocumentKeySet): Promise<MutableDocumentMap>;
|
|
48
48
|
getAllFromCollection(collection: ResourcePath, offset: IndexOffset): Promise<MutableDocumentMap>;
|
|
49
49
|
getAllFromCollectionGroup(collectionGroup: string, offset: IndexOffset, limit: number): Promise<MutableDocumentMap>;
|
|
50
|
-
getNewDocumentChanges(sinceReadTime: SnapshotVersion): Promise<{
|
|
51
|
-
changedDocs: MutableDocumentMap;
|
|
52
|
-
readTime: SnapshotVersion;
|
|
53
|
-
}>;
|
|
54
50
|
getSize(): Promise<number>;
|
|
55
51
|
newChangeBuffer(options?: {
|
|
56
52
|
trackRemovals: boolean;
|