@firebase/firestore 4.7.12-canary.d5082f9f2 → 4.7.12-canary.d5428f3d2
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/index/index_entry.d.ts +5 -22
- package/dist/firestore/src/local/indexeddb_schema.d.ts +5 -7
- package/dist/firestore/src/local/indexeddb_sentinels.d.ts +3 -12
- package/dist/index.cjs.js +1838 -1889
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +1839 -1890
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +52 -115
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +53 -116
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1884 -1935
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/firestore/src/index/index_entry.d.ts +5 -22
- package/dist/lite/firestore/src/local/indexeddb_schema.d.ts +5 -7
- package/dist/lite/firestore/src/local/indexeddb_sentinels.d.ts +3 -12
- package/dist/lite/index.browser.esm2017.js +15 -15
- package/dist/lite/index.cjs.js +15 -15
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/package.json +9 -11
|
@@ -14,36 +14,19 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import { DbIndexEntry } from '../local/indexeddb_schema';
|
|
18
|
-
import { DbIndexEntryKey, KeySafeBytes } from '../local/indexeddb_sentinels';
|
|
19
17
|
import { DocumentKey } from '../model/document_key';
|
|
20
18
|
/** Represents an index entry saved by the SDK in persisted storage. */
|
|
21
19
|
export declare class IndexEntry {
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
constructor(
|
|
20
|
+
readonly indexId: number;
|
|
21
|
+
readonly documentKey: DocumentKey;
|
|
22
|
+
readonly arrayValue: Uint8Array;
|
|
23
|
+
readonly directionalValue: Uint8Array;
|
|
24
|
+
constructor(indexId: number, documentKey: DocumentKey, arrayValue: Uint8Array, directionalValue: Uint8Array);
|
|
27
25
|
/**
|
|
28
26
|
* Returns an IndexEntry entry that sorts immediately after the current
|
|
29
27
|
* directional value.
|
|
30
28
|
*/
|
|
31
29
|
successor(): IndexEntry;
|
|
32
|
-
dbIndexEntry(uid: string, orderedDocumentKey: Uint8Array, documentKey: DocumentKey): DbIndexEntry;
|
|
33
|
-
dbIndexEntryKey(uid: string, orderedDocumentKey: Uint8Array, documentKey: DocumentKey): DbIndexEntryKey;
|
|
34
30
|
}
|
|
35
31
|
export declare function indexEntryComparator(left: IndexEntry, right: IndexEntry): number;
|
|
36
32
|
export declare function compareByteArrays(left: Uint8Array, right: Uint8Array): number;
|
|
37
|
-
/**
|
|
38
|
-
* Workaround for WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=292721
|
|
39
|
-
* Create a key safe representation of Uint8Array values.
|
|
40
|
-
* If the browser is detected as Safari or WebKit, then
|
|
41
|
-
* the input array will be converted to "sortable byte string".
|
|
42
|
-
* Otherwise, the input array will be returned in its original type.
|
|
43
|
-
*/
|
|
44
|
-
export declare function encodeKeySafeBytes(array: Uint8Array): KeySafeBytes;
|
|
45
|
-
/**
|
|
46
|
-
* Reverts the key safe representation of Uint8Array (created by
|
|
47
|
-
* encodeKeySafeBytes) to a normal Uint8Array.
|
|
48
|
-
*/
|
|
49
|
-
export declare function decodeKeySafeBytes(input: KeySafeBytes): Uint8Array;
|
|
@@ -19,7 +19,7 @@ import { IndexKind } from '../model/field_index';
|
|
|
19
19
|
import { BundledQuery } from '../protos/firestore_bundle_proto';
|
|
20
20
|
import { Document as ProtoDocument, DocumentsTarget as ProtoDocumentsTarget, QueryTarget as ProtoQueryTarget, Write as ProtoWrite } from '../protos/firestore_proto_api';
|
|
21
21
|
import { EncodedResourcePath } from './encoded_resource_path';
|
|
22
|
-
import { DbTimestampKey
|
|
22
|
+
import { DbTimestampKey } from './indexeddb_sentinels';
|
|
23
23
|
/**
|
|
24
24
|
* Schema Version for the Web client:
|
|
25
25
|
* 1. Initial version including Mutation Queue, Query Cache, and Remote
|
|
@@ -44,10 +44,8 @@ import { DbTimestampKey, KeySafeBytes } from './indexeddb_sentinels';
|
|
|
44
44
|
* 14. Add overlays.
|
|
45
45
|
* 15. Add indexing support.
|
|
46
46
|
* 16. Parse timestamp strings before creating index entries.
|
|
47
|
-
* 17. TODO(tomandersen)
|
|
48
|
-
* 18. Encode key safe representations of IndexEntry in DbIndexEntryStore.
|
|
49
47
|
*/
|
|
50
|
-
export declare const SCHEMA_VERSION =
|
|
48
|
+
export declare const SCHEMA_VERSION = 17;
|
|
51
49
|
/**
|
|
52
50
|
* Wrapper class to store timestamps (seconds and nanos) in IndexedDb objects.
|
|
53
51
|
*/
|
|
@@ -470,14 +468,14 @@ export interface DbIndexEntry {
|
|
|
470
468
|
/** The user id for this entry. */
|
|
471
469
|
uid: string;
|
|
472
470
|
/** The encoded array index value for this entry. */
|
|
473
|
-
arrayValue:
|
|
471
|
+
arrayValue: Uint8Array;
|
|
474
472
|
/** The encoded directional value for equality and inequality filters. */
|
|
475
|
-
directionalValue:
|
|
473
|
+
directionalValue: Uint8Array;
|
|
476
474
|
/**
|
|
477
475
|
* The document key this entry points to. This entry is encoded by an ordered
|
|
478
476
|
* encoder to match the key order of the index.
|
|
479
477
|
*/
|
|
480
|
-
orderedDocumentKey:
|
|
478
|
+
orderedDocumentKey: Uint8Array;
|
|
481
479
|
/** The segments of the document key this entry points to. */
|
|
482
480
|
documentKey: string[];
|
|
483
481
|
}
|
|
@@ -201,14 +201,6 @@ export declare const DbIndexStateKeyPath: string[];
|
|
|
201
201
|
*/
|
|
202
202
|
export declare const DbIndexStateSequenceNumberIndex = "sequenceNumberIndex";
|
|
203
203
|
export declare const DbIndexStateSequenceNumberIndexPath: string[];
|
|
204
|
-
/**
|
|
205
|
-
* Representation of a byte array that is safe for
|
|
206
|
-
* use in an IndexedDb key. The value is either
|
|
207
|
-
* a "sortable byte string", which is key safe in
|
|
208
|
-
* Safari/WebKit, or the value is a Uint8Array,
|
|
209
|
-
* which is key safe in other browsers.
|
|
210
|
-
*/
|
|
211
|
-
export type KeySafeBytes = Uint8Array | string;
|
|
212
204
|
/**
|
|
213
205
|
* The key for each index entry consists of the index id and its user id,
|
|
214
206
|
* the encoded array and directional value for the indexed fields as well as
|
|
@@ -217,9 +209,9 @@ export type KeySafeBytes = Uint8Array | string;
|
|
|
217
209
|
export type DbIndexEntryKey = [
|
|
218
210
|
number,
|
|
219
211
|
string,
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
212
|
+
Uint8Array,
|
|
213
|
+
Uint8Array,
|
|
214
|
+
Uint8Array,
|
|
223
215
|
string[]
|
|
224
216
|
];
|
|
225
217
|
/** Name of the IndexedDb object store. */
|
|
@@ -256,7 +248,6 @@ export declare const V14_STORES: string[];
|
|
|
256
248
|
export declare const V15_STORES: string[];
|
|
257
249
|
export declare const V16_STORES: string[];
|
|
258
250
|
export declare const V17_STORES: string[];
|
|
259
|
-
export declare const V18_STORES: string[];
|
|
260
251
|
/**
|
|
261
252
|
* The list of all default IndexedDB stores used throughout the SDK. This is
|
|
262
253
|
* used when creating transactions so that access across all stores is done
|