@firebase/firestore 3.4.4-202211222730 → 3.4.4-canary.00916e719
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/dist/firestore/src/core/target.d.ts +8 -4
- package/dist/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/firestore/test/util/helpers.d.ts +1 -1
- package/dist/index.esm2017.js +3172 -3099
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +3564 -3511
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +151 -63
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +151 -63
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +3238 -3165
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +170 -2
- package/dist/lite/firestore/src/core/target.d.ts +8 -4
- package/dist/lite/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/lite/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/lite/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/lite/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/lite/firestore/test/util/helpers.d.ts +1 -1
- package/dist/lite/index.browser.esm2017.js +1146 -1143
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +332 -331
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +36 -29
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +36 -29
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +301 -298
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +2 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +121 -121
- package/dist/lite/packages/firestore/src/core/target.d.ts +8 -4
- package/dist/lite/packages/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/lite/packages/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/lite/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/lite/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +1 -1
- package/dist/lite/private.d.ts +2 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +176 -176
- package/dist/packages/firestore/src/core/target.d.ts +8 -4
- package/dist/packages/firestore/src/lite-api/query.d.ts +2 -2
- package/dist/packages/firestore/src/local/index_manager.d.ts +52 -0
- package/dist/packages/firestore/src/local/indexeddb_index_manager.d.ts +11 -0
- package/dist/packages/firestore/src/local/memory_index_manager.d.ts +11 -0
- package/dist/packages/firestore/test/util/helpers.d.ts +1 -1
- package/dist/private.d.ts +170 -2
- package/package.json +9 -9
|
@@ -176,10 +176,9 @@ export declare class ArrayContainsAnyFilter extends FieldFilter {
|
|
|
176
176
|
*/
|
|
177
177
|
export declare class Bound {
|
|
178
178
|
readonly position: ProtoValue[];
|
|
179
|
-
readonly
|
|
180
|
-
constructor(position: ProtoValue[],
|
|
179
|
+
readonly inclusive: boolean;
|
|
180
|
+
constructor(position: ProtoValue[], inclusive: boolean);
|
|
181
181
|
}
|
|
182
|
-
export declare function canonifyBound(bound: Bound): string;
|
|
183
182
|
/**
|
|
184
183
|
* An ordering on a field, in some Direction. Direction defaults to ASCENDING.
|
|
185
184
|
*/
|
|
@@ -191,9 +190,14 @@ export declare class OrderBy {
|
|
|
191
190
|
export declare function canonifyOrderBy(orderBy: OrderBy): string;
|
|
192
191
|
export declare function stringifyOrderBy(orderBy: OrderBy): string;
|
|
193
192
|
export declare function orderByEquals(left: OrderBy, right: OrderBy): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Returns true if a document sorts after a bound using the provided sort
|
|
195
|
+
* order.
|
|
196
|
+
*/
|
|
197
|
+
export declare function boundSortsAfterDocument(bound: Bound, orderBy: OrderBy[], doc: Document): boolean;
|
|
194
198
|
/**
|
|
195
199
|
* Returns true if a document sorts before a bound using the provided sort
|
|
196
200
|
* order.
|
|
197
201
|
*/
|
|
198
|
-
export declare function
|
|
202
|
+
export declare function boundSortsBeforeDocument(bound: Bound, orderBy: OrderBy[], doc: Document): boolean;
|
|
199
203
|
export declare function boundEquals(left: Bound | null, right: Bound | null): boolean;
|
|
@@ -196,8 +196,8 @@ export declare function newQueryOrderBy(query: InternalQuery, fieldPath: Interna
|
|
|
196
196
|
* of the query or if any of the fields in the order by are an uncommitted
|
|
197
197
|
* server timestamp.
|
|
198
198
|
*/
|
|
199
|
-
export declare function newQueryBoundFromDocument(query: InternalQuery, databaseId: DatabaseId, methodName: string, doc: Document | null,
|
|
199
|
+
export declare function newQueryBoundFromDocument(query: InternalQuery, databaseId: DatabaseId, methodName: string, doc: Document | null, inclusive: boolean): Bound;
|
|
200
200
|
/**
|
|
201
201
|
* Converts a list of field values to a `Bound` for the given query.
|
|
202
202
|
*/
|
|
203
|
-
export declare function newQueryBoundFromFields(query: InternalQuery, databaseId: DatabaseId, dataReader: UserDataReader, methodName: string, values: unknown[],
|
|
203
|
+
export declare function newQueryBoundFromFields(query: InternalQuery, databaseId: DatabaseId, dataReader: UserDataReader, methodName: string, values: unknown[], inclusive: boolean): Bound;
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { Target } from '../core/target';
|
|
18
|
+
import { DocumentKeySet, DocumentMap } from '../model/collections';
|
|
19
|
+
import { FieldIndex, IndexOffset } from '../model/field_index';
|
|
17
20
|
import { ResourcePath } from '../model/path';
|
|
18
21
|
import { PersistencePromise } from './persistence_promise';
|
|
19
22
|
import { PersistenceTransaction } from './persistence_transaction';
|
|
@@ -40,4 +43,53 @@ export interface IndexManager {
|
|
|
40
43
|
* path for a root-level collection).
|
|
41
44
|
*/
|
|
42
45
|
getCollectionParents(transaction: PersistenceTransaction, collectionId: string): PersistencePromise<ResourcePath[]>;
|
|
46
|
+
/**
|
|
47
|
+
* Adds a field path index.
|
|
48
|
+
*
|
|
49
|
+
* Values for this index are persisted via the index backfill, which runs
|
|
50
|
+
* asynchronously in the background. Once the first values are written,
|
|
51
|
+
* an index can be used to serve partial results for any matching queries.
|
|
52
|
+
* Any unindexed portion of the database will continue to be served via
|
|
53
|
+
* collection scons.
|
|
54
|
+
*/
|
|
55
|
+
addFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
56
|
+
/** Removes the given field index and deletes all index values. */
|
|
57
|
+
deleteFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Returns a list of field indexes that correspond to the specified collection
|
|
60
|
+
* group.
|
|
61
|
+
*
|
|
62
|
+
* @param collectionGroup The collection group to get matching field indexes
|
|
63
|
+
* for.
|
|
64
|
+
* @return A collection of field indexes for the specified collection group.
|
|
65
|
+
*/
|
|
66
|
+
getFieldIndexes(transaction: PersistenceTransaction, collectionGroup: string): PersistencePromise<FieldIndex[]>;
|
|
67
|
+
/** Returns all configured field indexes. */
|
|
68
|
+
getFieldIndexes(transaction: PersistenceTransaction): PersistencePromise<FieldIndex[]>;
|
|
69
|
+
/**
|
|
70
|
+
* Returns an index that can be used to serve the provided target. Returns
|
|
71
|
+
* `null` if no index is configured.
|
|
72
|
+
*/
|
|
73
|
+
getFieldIndex(transaction: PersistenceTransaction, target: Target): PersistencePromise<FieldIndex | null>;
|
|
74
|
+
/**
|
|
75
|
+
* Returns the documents that match the given target based on the provided
|
|
76
|
+
* index.
|
|
77
|
+
*/
|
|
78
|
+
getDocumentsMatchingTarget(transaction: PersistenceTransaction, fieldIndex: FieldIndex, target: Target): PersistencePromise<DocumentKeySet>;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the next collection group to update. Returns `null` if no group
|
|
81
|
+
* exists.
|
|
82
|
+
*/
|
|
83
|
+
getNextCollectionGroupToUpdate(transaction: PersistenceTransaction): PersistencePromise<string | null>;
|
|
84
|
+
/**
|
|
85
|
+
* Sets the collection group's latest read time.
|
|
86
|
+
*
|
|
87
|
+
* This method updates the index offset for all field indices for the
|
|
88
|
+
* collection group and increments their sequence number. Subsequent calls to
|
|
89
|
+
* `getNextCollectionGroupToUpdate()` will return a different collection group
|
|
90
|
+
* (unless only one collection group is configured).
|
|
91
|
+
*/
|
|
92
|
+
updateCollectionGroup(transaction: PersistenceTransaction, collectionGroup: string, offset: IndexOffset): PersistencePromise<void>;
|
|
93
|
+
/** Updates the index entries for the provided documents. */
|
|
94
|
+
updateIndexEntries(transaction: PersistenceTransaction, documents: DocumentMap): PersistencePromise<void>;
|
|
43
95
|
}
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { Target } from '../core/target';
|
|
18
|
+
import { DocumentKeySet, DocumentMap } from '../model/collections';
|
|
19
|
+
import { FieldIndex, IndexOffset } from '../model/field_index';
|
|
17
20
|
import { ResourcePath } from '../model/path';
|
|
18
21
|
import { IndexManager } from './index_manager';
|
|
19
22
|
import { PersistencePromise } from './persistence_promise';
|
|
@@ -39,4 +42,12 @@ export declare class IndexedDbIndexManager implements IndexManager {
|
|
|
39
42
|
*/
|
|
40
43
|
addToCollectionParentIndex(transaction: PersistenceTransaction, collectionPath: ResourcePath): PersistencePromise<void>;
|
|
41
44
|
getCollectionParents(transaction: PersistenceTransaction, collectionId: string): PersistencePromise<ResourcePath[]>;
|
|
45
|
+
addFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
46
|
+
deleteFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
47
|
+
getDocumentsMatchingTarget(transaction: PersistenceTransaction, fieldIndex: FieldIndex, target: Target): PersistencePromise<DocumentKeySet>;
|
|
48
|
+
getFieldIndex(transaction: PersistenceTransaction, target: Target): PersistencePromise<FieldIndex | null>;
|
|
49
|
+
getFieldIndexes(transaction: PersistenceTransaction, collectionGroup?: string): PersistencePromise<FieldIndex[]>;
|
|
50
|
+
getNextCollectionGroupToUpdate(transaction: PersistenceTransaction): PersistencePromise<string | null>;
|
|
51
|
+
updateCollectionGroup(transaction: PersistenceTransaction, collectionGroup: string, offset: IndexOffset): PersistencePromise<void>;
|
|
52
|
+
updateIndexEntries(transaction: PersistenceTransaction, documents: DocumentMap): PersistencePromise<void>;
|
|
42
53
|
}
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { Target } from '../core/target';
|
|
18
|
+
import { DocumentKeySet, DocumentMap } from '../model/collections';
|
|
19
|
+
import { FieldIndex, IndexOffset } from '../model/field_index';
|
|
17
20
|
import { ResourcePath } from '../model/path';
|
|
18
21
|
import { IndexManager } from './index_manager';
|
|
19
22
|
import { PersistencePromise } from './persistence_promise';
|
|
@@ -25,6 +28,14 @@ export declare class MemoryIndexManager implements IndexManager {
|
|
|
25
28
|
private collectionParentIndex;
|
|
26
29
|
addToCollectionParentIndex(transaction: PersistenceTransaction, collectionPath: ResourcePath): PersistencePromise<void>;
|
|
27
30
|
getCollectionParents(transaction: PersistenceTransaction, collectionId: string): PersistencePromise<ResourcePath[]>;
|
|
31
|
+
addFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
32
|
+
deleteFieldIndex(transaction: PersistenceTransaction, index: FieldIndex): PersistencePromise<void>;
|
|
33
|
+
getDocumentsMatchingTarget(transaction: PersistenceTransaction, fieldIndex: FieldIndex, target: Target): PersistencePromise<DocumentKeySet>;
|
|
34
|
+
getFieldIndex(transaction: PersistenceTransaction, target: Target): PersistencePromise<FieldIndex | null>;
|
|
35
|
+
getFieldIndexes(transaction: PersistenceTransaction, collectionGroup?: string): PersistencePromise<FieldIndex[]>;
|
|
36
|
+
getNextCollectionGroupToUpdate(transaction: PersistenceTransaction): PersistencePromise<string | null>;
|
|
37
|
+
updateCollectionGroup(transaction: PersistenceTransaction, collectionGroup: string, offset: IndexOffset): PersistencePromise<void>;
|
|
38
|
+
updateIndexEntries(transaction: PersistenceTransaction, documents: DocumentMap): PersistencePromise<void>;
|
|
28
39
|
}
|
|
29
40
|
/**
|
|
30
41
|
* Internal implementation of the collection-parent index exposed by MemoryIndexManager.
|
|
@@ -71,7 +71,7 @@ export declare function setMutation(keyStr: string, json: JsonObject<unknown>):
|
|
|
71
71
|
export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
|
|
72
72
|
export declare function deleteMutation(keyStr: string): DeleteMutation;
|
|
73
73
|
export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
|
|
74
|
-
export declare function bound(values: unknown[],
|
|
74
|
+
export declare function bound(values: unknown[], inclusive: boolean): Bound;
|
|
75
75
|
export declare function query(resourcePath: string, ...constraints: Array<OrderBy | Filter>): Query;
|
|
76
76
|
export declare function targetData(targetId: TargetId, queryPurpose: TargetPurpose, path: string): TargetData;
|
|
77
77
|
export declare function noChangeEvent(targetId: number, snapshotVersion: number, resumeToken?: ByteString): RemoteEvent;
|