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
Experimental options to configure the Firestore SDK.
14
+
15
+
Note: This interface is "experimental" and is subject to change.
16
+
17
+
See `FirestoreSettings.experimental`<!---->.
18
+
19
+
<b>Signature:</b>
20
+
21
+
```typescript
22
+
exportdeclareinterfaceExperimentalOptions
23
+
```
24
+
25
+
## Properties
26
+
27
+
| Property | Type | Description |
28
+
| --- | --- | --- |
29
+
| [sendWriteRequestsDelayMs](./firestore_.experimentaloptions.md#experimentaloptionssendwriterequestsdelayms) | number | The maximum amount of time, in milliseconds, to wait before sending a Firestore "write" request to the backend. If <code>undefined</code> then do not delay at all.<!-- -->A delay can be useful because it enables the in-memory "write pipeline" to gather together multiple write requests and send them in a single HTTP request to the backend, rather than one HTTP request per write request, as is done when by default, or when this property is <code>undefined</code>. Note that there is a hardcoded limit to the number of write requests that are sent at once, so setting a very large value for this property will not necessarily cause \_all\_ write requests to be sent in a single HTTP request; however, it \_could\_ greatly reduce the number of distinct HTTP requests that are used.<!-- -->The value must be an integer value strictly greater than zero and less than or equal to 10000 (10 seconds). A value of <code>200</code> is a good starting point to minimize write latency yet still enable some amount of batching.<!-- -->See https://github.com/firebase/firebase-js-sdk/issues/5971 for rationale and background information that motivated this option. |
30
+
31
+
## ExperimentalOptions.sendWriteRequestsDelayMs
32
+
33
+
Themaximumamountoftime, inmilliseconds, towaitbeforesendingaFirestore "write" requesttothebackend. If `undefined` thendonotdelayatall.
34
+
35
+
Adelaycanbeusefulbecauseitenablesthein-memory "writepipeline" togathertogethermultiplewriterequestsandsendtheminasingleHTTPrequesttothebackend, ratherthanoneHTTPrequestperwriterequest, asisdonewhenbydefault, orwhenthispropertyis `undefined`<!-- -->. Notethatthereisahardcodedlimittothenumberofwriterequeststhataresentatonce, sosettingaverylargevalueforthispropertywillnotnecessarilycause \_all\_writerequeststobesentinasingleHTTPrequest; however, it \_could\_greatlyreducethenumberofdistinctHTTPrequeststhatareused.
|[DocumentChange](./firestore_.documentchange.md#documentchange_interface)| A <code>DocumentChange</code> represents a change to the documents matching a query. It contains the document affected and the type of change that occurred. |
169
169
|[DocumentData](./firestore_.documentdata.md#documentdata_interface)| Document data (for use with [setDoc()](./firestore_lite.md#setdoc_ee215ad)<!---->) consists of fields mapped to values. |
170
170
|[ExperimentalLongPollingOptions](./firestore_.experimentallongpollingoptions.md#experimentallongpollingoptions_interface)| Options that configure the SDK’s underlying network transport (WebChannel) when long-polling is used.<!---->Note: This interface is "experimental" and is subject to change.<!---->See <code>FirestoreSettings.experimentalAutoDetectLongPolling</code>, <code>FirestoreSettings.experimentalForceLongPolling</code>, and <code>FirestoreSettings.experimentalLongPollingOptions</code>. |
171
+
|[ExperimentalOptions](./firestore_.experimentaloptions.md#experimentaloptions_interface)| Experimental options to configure the Firestore SDK.<!---->Note: This interface is "experimental" and is subject to change.<!---->See <code>FirestoreSettings.experimental</code>. |
171
172
| [FirestoreDataConverter](./firestore_.firestoredataconverter.md#firestoredataconverter_interface) | Converter used by <code>withConverter()</code> to transform user objects of type <code>AppModelType</code> into Firestore data of type <code>DbModelType</code>.<!-- -->Using the converter allows you to specify generic type arguments when storing and retrieving objects from Firestore.<!-- -->In this context, an "AppModel" is a class that is used in an application to package together related information and functionality. Such a class could, for example, have properties with complex, nested data types, properties used for memoization, properties of types not supported by Firestore (such as <code>symbol</code> and <code>bigint</code>), and helper functions that perform compound operations. Such classes are not suitable and/or possible to store into a Firestore database. Instead, instances of such classes need to be converted to "plain old JavaScript objects" (POJOs) with exclusively primitive properties, potentially nested inside other POJOs or arrays of POJOs. In this context, this type is referred to as the "DbModel" and would be an object suitable for persisting into Firestore. For convenience, applications can implement <code>FirestoreDataConverter</code> and register the converter with Firestore objects, such as <code>DocumentReference</code> or <code>Query</code>, to automatically convert <code>AppModel</code> to <code>DbModel</code> when storing into Firestore, and convert <code>DbModel</code> to <code>AppModel</code> when retrieving from Firestore. |
172
173
|[FirestoreSettings](./firestore_.firestoresettings.md#firestoresettings_interface)| Specifies custom configurations for your Cloud Firestore instance. You must set these before invoking any other methods. |
173
174
|[Index](./firestore_.index.md#index_interface)| <b><i>(Public Preview)</i></b> The SDK definition of a Firestore index. |
0 commit comments