UNPKG

voluptasmollitia

Version:
29 lines (16 loc) 1.12 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [lite](./firestore_lite.md) &gt; [writeBatch](./firestore_lite.writebatch.md) ## writeBatch() function Creates a write batch, used for performing multiple writes as a single atomic operation. The maximum number of writes allowed in a single WriteBatch is 500. The result of these writes will only be reflected in document reads that occur after the returned Promise resolves. If the client is offline, the write fails. If you would like to see local modifications or buffer writes until the client is online, use the full Firestore SDK. <b>Signature:</b> ```typescript export declare function writeBatch(firestore: FirebaseFirestore): WriteBatch; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | firestore | [FirebaseFirestore](./firestore_lite.firebasefirestore.md) | | <b>Returns:</b> [WriteBatch](./firestore_lite.writebatch.md) A `WriteBatch` that can be used to atomically execute multiple writes.