You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[getFirestore(app)](./firestore_.md#getfirestore)| Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
20
+
|[getFirestore(app, databaseId)](./firestore_.md#getfirestore)| <b><i>(BETA)</i></b> Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
20
21
|[initializeFirestore(app, settings, databaseId)](./firestore_.md#initializefirestore)| Initializes a new instance of [Firestore](./firestore_.firestore.md#firestore_class) with the provided settings. Can only be called before any other function, including [getFirestore()](./firestore_.md#getfirestore)<!---->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!---->. |
21
22
| <b>function(firestore...)</b> |
22
23
| [clearIndexedDbPersistence(firestore)](./firestore_.md#clearindexeddbpersistence) | Clears the persistent storage. This includes pending writes and cached documents.<!-- -->Must be called while the [Firestore](./firestore_.firestore.md#firestore_class) instance is not started (after the app is terminated or when the app is first initialized). On startup, this function must be called before other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore) or [getFirestore()](./firestore_.md#getfirestore)<!-- -->)). If the [Firestore](./firestore_.firestore.md#firestore_class) instance is still running, the promise will be rejected with the error code of <code>failed-precondition</code>.<!-- -->Note: <code>clearIndexedDbPersistence()</code> is primarily intended to help write reliable tests that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications that are sensitive to the disclosure of cached data in between user sessions, we strongly recommend not enabling persistence at all. |
|[memoryEagerGarbageCollector()](./firestore_.md#memoryeagergarbagecollector)| Creates an instance of <code>MemoryEagerGarbageCollector</code>. This is also the default garbage collector unless it is explicitly specified otherwise. |
46
47
|[persistentMultipleTabManager()](./firestore_.md#persistentmultipletabmanager)| Creates an instance of <code>PersistentMultipleTabManager</code>. |
47
48
|[serverTimestamp()](./firestore_.md#servertimestamp)| Returns a sentinel used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) to include a server-generated timestamp in the written data. |
49
+
| <b>function(databaseId...)</b> |
50
+
|[getFirestore(databaseId)](./firestore_.md#getfirestore)| <b><i>(BETA)</i></b> Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
48
51
| <b>function(elements...)</b> |
49
52
|[arrayRemove(elements)](./firestore_.md#arrayremove)| Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc) or that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array. |
50
53
|[arrayUnion(elements)](./firestore_.md#arrayunion)| Returns a special value that can be used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) that tells the server to union the given elements with any array value that already exists on the server. Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements. |
@@ -226,6 +229,32 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
226
229
227
230
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
228
231
232
+
## getFirestore()
233
+
234
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
235
+
>
236
+
237
+
Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings.
| app |[FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)| The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) instance that the returned [Firestore](./firestore_.firestore.md#firestore_class) instance is associated with. |
250
+
| databaseId | string | The name of the database. |
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
257
+
229
258
## initializeFirestore()
230
259
231
260
Initializes a new instance of [Firestore](./firestore_.firestore.md#firestore_class) with the provided settings. Can only be called before any other function, including [getFirestore()](./firestore_.md#getfirestore)<!---->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!---->.
| app |[FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)| The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) with which the [Firestore](./firestore_.firestore.md#firestore_class) instance will be associated. |
244
273
| settings |[FirestoreSettings](./firestore_.firestoresettings.md#firestoresettings_interface)| A settings object to configure the [Firestore](./firestore_.firestore.md#firestore_class) instance. |
245
-
| databaseId | string | The name of database. |
274
+
| databaseId | string | The name of the database. |
246
275
247
276
<b>Returns:</b>
248
277
@@ -855,6 +884,31 @@ export declare function serverTimestamp(): FieldValue;
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
890
+
>
891
+
892
+
Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings.
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
911
+
858
912
## arrayRemove()
859
913
860
914
Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc) or that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array.
|[getFirestore(app)](./firestore_lite.md#getfirestore)| Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
20
+
|[getFirestore(app, databaseId)](./firestore_lite.md#getfirestore)| <b><i>(BETA)</i></b> Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
20
21
|[initializeFirestore(app, settings)](./firestore_lite.md#initializefirestore)| Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore)<!---->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!---->. |
22
+
|[initializeFirestore(app, settings, databaseId)](./firestore_lite.md#initializefirestore)| <b><i>(BETA)</i></b> Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore)<!---->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!---->. |
21
23
| <b>function(firestore...)</b> |
22
24
|[collection(firestore, path, pathSegments)](./firestore_lite.md#collection)| Gets a <code>CollectionReference</code> instance that refers to the collection at the specified absolute path. |
23
25
|[collectionGroup(firestore, collectionId)](./firestore_lite.md#collectiongroup)| Creates and returns a new <code>Query</code> instance that includes all documents in the database that are contained in a collection or subcollection with the given <code>collectionId</code>. |
|[documentId()](./firestore_lite.md#documentid)| Returns a special sentinel <code>FieldPath</code> to refer to the ID of a document. It can be used in queries to sort or filter by the document ID. |
32
34
|[getFirestore()](./firestore_lite.md#getfirestore)| Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
33
35
|[serverTimestamp()](./firestore_lite.md#servertimestamp)| Returns a sentinel used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) to include a server-generated timestamp in the written data. |
36
+
| <b>function(databaseId...)</b> |
37
+
|[getFirestore(databaseId)](./firestore_lite.md#getfirestore)| <b><i>(BETA)</i></b> Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings. |
34
38
| <b>function(elements...)</b> |
35
39
|[arrayRemove(elements)](./firestore_lite.md#arrayremove)| Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc) or that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array. |
36
40
|[arrayUnion(elements)](./firestore_lite.md#arrayunion)| Returns a special value that can be used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) that tells the server to union the given elements with any array value that already exists on the server. Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements. |
@@ -163,6 +167,32 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
163
167
164
168
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
165
169
170
+
## getFirestore()
171
+
172
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
173
+
>
174
+
175
+
Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings.
| app |[FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)| The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) instance that the returned [Firestore](./firestore_.firestore.md#firestore_class) instance is associated with. |
188
+
| databaseId | string | The name of the database. |
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
195
+
166
196
## initializeFirestore()
167
197
168
198
Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore)<!---->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!---->.
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
222
+
>
223
+
224
+
Initializes a new instance of Cloud Firestore with the provided settings. Can only be called before any other functions, including [getFirestore()](./firestore_.md#getfirestore)<!---->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!---->.
| app |[FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)| The [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface) with which the <code>Firestore</code> instance will be associated. |
237
+
| settings |[Settings](./firestore_lite.settings.md#settings_interface)| A settings object to configure the <code>Firestore</code> instance. |
238
+
| databaseId | string | The name of the database. |
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
487
+
>
488
+
489
+
Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. If no instance exists, initializes a new instance with default settings.
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
508
+
427
509
## arrayRemove()
428
510
429
511
Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc) or that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array.
0 commit comments