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.
@@ -208,7 +209,7 @@ If no callback is passed, a promise is returned.
208
209
209
210
### `db.get(key[, options][, callback])`
210
211
211
-
<code>get()</code> is the primary method for fetching data from the store. The `key` can be of any type. If it doesn't exist in the store then the callback or promise will receive an error. A not-found err object will be of type `'NotFoundError'` so you can `err.type == 'NotFoundError'` or you can perform a truthy test on the property `err.notFound`.
212
+
Get a value from the store by `key`. The `key` can be of any type. If it doesn't exist in the store then the callback or promise will receive an error. A not-found err object will be of type `'NotFoundError'` so you can `err.type == 'NotFoundError'` or you can perform a truthy test on the property `err.notFound`.
212
213
213
214
```js
214
215
db.get('foo', function (err, value) {
@@ -225,10 +226,20 @@ db.get('foo', function (err, value) {
225
226
})
226
227
```
227
228
228
-
`options` is passed on to the underlying store.
229
+
The optional `options` object is passed on to the underlying store.
229
230
230
231
If no callback is passed, a promise is returned.
231
232
233
+
<aname="get_many"></a>
234
+
235
+
### `db.getMany(keys[, options][, callback])`
236
+
237
+
Get multiple values from the store by an array of `keys`. The optional `options` object is passed on to the underlying store.
238
+
239
+
The `callback` function will be called with an `Error` if the operation failed for any reason. If successful the first argument will be `null` and the second argument will be an array of values with the same order as `keys`. If a key was not found, the relevant value will be `undefined`.
240
+
241
+
If no callback is provided, a promise is returned.
0 commit comments