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
{{ message }}
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,27 +289,27 @@ db.batch()
289
289
.write(function () { console.log('Done!') })
290
290
```
291
291
292
-
<b><code>batch.put(key, value)</code></b>
292
+
**`batch.put(key, value[, options])`**
293
293
294
-
Queue a _put_ operation on the current batch, not committed until a `write()` is called on the batch.
294
+
Queue a _put_ operation on the current batch, not committed until a `write()` is called on the batch. The `options` argument, if provided, must be an object and is passed on to the underlying store.
295
295
296
296
This method may `throw` a `WriteError` if there is a problem with your put (such as the `value` being `null` or `undefined`).
297
297
298
-
<b><code>batch.del(key)</code></b>
298
+
**`batch.del(key[, options])`**
299
299
300
-
Queue a _del_ operation on the current batch, not committed until a `write()` is called on the batch.
300
+
Queue a _del_ operation on the current batch, not committed until a `write()` is called on the batch. The `options` argument, if provided, must be an object and is passed on to the underlying store.
301
301
302
302
This method may `throw` a `WriteError` if there is a problem with your delete.
303
303
304
-
<b><code>batch.clear()</code></b>
304
+
**`batch.clear()`**
305
305
306
306
Clear all queued operations on the current batch, any previous operations will be discarded.
307
307
308
-
<b><code>batch.length</code></b>
308
+
**`batch.length`**
309
309
310
310
The number of queued operations on the current batch.
Commit the queued operations for this batch. All operations not _cleared_ will be written to the underlying store atomically, that is, they will either all succeed or fail with no partial commits.
0 commit comments