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
Copy file name to clipboardExpand all lines: docs-devsite/database.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Firebase Realtime Database
19
19
| <b>function(app, ...)</b> |
20
20
|[getDatabase(app, url)](./database.md#getdatabase_d9cea01)| Returns the instance of the Realtime Database SDK that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!---->. Initializes a new instance with default settings if no instance exists or if the existing instance uses a custom database URL. |
21
21
| <b>function(db, ...)</b> |
22
-
|[connectDatabaseEmulator(db, host, port, options)](./database.md#connectdatabaseemulator_27b9e93)| Modify the provided instance to communicate with the Realtime Database emulator.<p>Note: This method must be called before performing any other operation. |
22
+
|[connectDatabaseEmulator(db, host, port, options)](./database.md#connectdatabaseemulator_20a9664)| Modify the provided instance to communicate with the Realtime Database emulator.<p>Note: This method must be called before performing any other operation. |
23
23
|[goOffline(db)](./database.md#gooffline_732b338)| Disconnects from the server (all Database operations will be completed offline).<!---->The client automatically maintains a persistent connection to the Database server, which will remain active indefinitely and reconnect when disconnected. However, the <code>goOffline()</code> and <code>goOnline()</code> methods may be used to control the client connection in cases where a persistent connection is undesirable.<!---->While offline, the client will no longer receive data updates from the Database. However, all Database operations performed locally will continue to immediately fire events, allowing your application to continue behaving normally. Additionally, each operation performed locally will automatically be queued and retried upon reconnection to the Database server.<!---->To reconnect to the Database and begin receiving remote events, see <code>goOnline()</code>. |
24
24
|[goOnline(db)](./database.md#goonline_732b338)| Reconnects to the server and synchronizes the offline Database state with the server state.<!---->This method should be used after disabling the active connection with <code>goOffline()</code>. Once reconnected, the client will transmit the proper data and fire the appropriate events so that your client "catches up" automatically. |
25
25
|[ref(db, path)](./database.md#ref_5f88fa2)| Returns a <code>Reference</code> representing the location in the Database corresponding to the provided path. If no path is provided, the <code>Reference</code> will point to the root of the Database. |
@@ -135,7 +135,7 @@ The `Database` instance of the provided app.
| [clearIndexedDbPersistence(firestore)](./firestore_.md#clearindexeddbpersistence_231a8e0) | 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_fc7d200) 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. |
24
24
|[collection(firestore, path, pathSegments)](./firestore_.md#collection_1eb4c23)| Gets a <code>CollectionReference</code> instance that refers to the collection at the specified absolute path. |
25
25
|[collectionGroup(firestore, collectionId)](./firestore_.md#collectiongroup_1838fc3)| 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>. |
26
-
|[connectFirestoreEmulator(firestore, host, port, options)](./firestore_.md#connectfirestoreemulator_7c247cd)| Modify this instance to communicate with the Cloud Firestore emulator.<!---->Note: This must be called before this instance has been used to do any operations. |
26
+
|[connectFirestoreEmulator(firestore, host, port, options)](./firestore_.md#connectfirestoreemulator_6c8868a)| Modify this instance to communicate with the Cloud Firestore emulator.<!---->Note: This must be called before this instance has been used to do any operations. |
27
27
|[disableNetwork(firestore)](./firestore_.md#disablenetwork_231a8e0)| Disables network usage for this instance. It can be re-enabled via [enableNetwork()](./firestore_.md#enablenetwork_231a8e0)<!---->. While the network is disabled, any snapshot listeners, <code>getDoc()</code> or <code>getDocs()</code> calls will return results from cache, and any write operations will be queued until the network is restored. |
28
28
|[doc(firestore, path, pathSegments)](./firestore_.md#doc_1eb4c23)| Gets a <code>DocumentReference</code> instance that refers to the document at the specified absolute path. |
29
29
| [enableIndexedDbPersistence(firestore, persistenceSettings)](./firestore_.md#enableindexeddbpersistence_224174f) | Attempts to enable persistent storage, if possible.<!-- -->On failure, <code>enableIndexedDbPersistence()</code> will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.<!-- -->Note: <code>enableIndexedDbPersistence()</code> must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200)<!-- -->, [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0)<!-- -->.<!-- -->Persistence cannot be used in a Node.js environment. |
|[collection(firestore, path, pathSegments)](./firestore_lite.md#collection_1eb4c23)| Gets a <code>CollectionReference</code> instance that refers to the collection at the specified absolute path. |
25
25
|[collectionGroup(firestore, collectionId)](./firestore_lite.md#collectiongroup_1838fc3)| 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>. |
26
-
|[connectFirestoreEmulator(firestore, host, port, options)](./firestore_lite.md#connectfirestoreemulator_7c247cd)| Modify this instance to communicate with the Cloud Firestore emulator.<!---->Note: This must be called before this instance has been used to do any operations. |
26
+
|[connectFirestoreEmulator(firestore, host, port, options)](./firestore_lite.md#connectfirestoreemulator_6c8868a)| Modify this instance to communicate with the Cloud Firestore emulator.<!---->Note: This must be called before this instance has been used to do any operations. |
27
27
|[doc(firestore, path, pathSegments)](./firestore_lite.md#doc_1eb4c23)| Gets a <code>DocumentReference</code> instance that refers to the document at the specified absolute path. |
28
28
|[runTransaction(firestore, updateFunction, options)](./firestore_lite.md#runtransaction_6f03ec4)| Executes the given <code>updateFunction</code> and then attempts to commit the changes applied within the transaction. If any document read within the transaction has changed, Cloud Firestore retries the <code>updateFunction</code>. If it fails to commit after 5 attempts, the transaction fails.<!---->The maximum number of writes allowed in a single transaction is 500. |
29
29
|[terminate(firestore)](./firestore_lite.md#terminate_231a8e0)| Terminates the provided <code>Firestore</code> instance.<!---->After calling <code>terminate()</code> only the <code>clearIndexedDbPersistence()</code> functions may be used. Any other function will throw a <code>FirestoreError</code>. Termination does not cancel any pending writes, and any promises that are awaiting a response from the server will not be resolved.<!---->To restart after termination, create a new instance of <code>Firestore</code> with [getFirestore()](./firestore_.md#getfirestore)<!---->.<!---->Note: Under normal circumstances, calling <code>terminate()</code> is not required. This function is useful only when you want to force this instance to release all of its resources or in combination with [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0) to ensure that all local state is destroyed between test runs. |
| firestore |[Firestore](./firestore_lite.firestore.md#firestore_class)| The <code>Firestore</code> instance to configure to connect to the emulator. |
Copy file name to clipboardExpand all lines: docs-devsite/functions.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Cloud Functions for Firebase
19
19
| <b>function(app, ...)</b> |
20
20
|[getFunctions(app, regionOrCustomDomain)](./functions.md#getfunctions_60f2095)| Returns a [Functions](./functions.functions.md#functions_interface) instance for the given app. |
21
21
| <b>function(functionsInstance, ...)</b> |
22
-
|[connectFunctionsEmulator(functionsInstance, host, port)](./functions.md#connectfunctionsemulator_505c08d)| Modify this instance to communicate with the Cloud Functions emulator.<!---->Note: this must be called before this instance has been used to do any operations. |
22
+
|[connectFunctionsEmulator(functionsInstance, host, port, ssl)](./functions.md#connectfunctionsemulator_a989598)| Modify this instance to communicate with the Cloud Functions emulator.<!---->Note: this must be called before this instance has been used to do any operations. |
23
23
|[httpsCallable(functionsInstance, name, options)](./functions.md#httpscallable_1dd297c)| Returns a reference to the callable HTTPS trigger with the given name. |
24
24
|[httpsCallableFromURL(functionsInstance, url, options)](./functions.md#httpscallablefromurl_7af6987)| Returns a reference to the callable HTTPS trigger with the specified url. |
25
25
@@ -72,7 +72,7 @@ export declare function getFunctions(app?: FirebaseApp, regionOrCustomDomain?: s
0 commit comments