@@ -4,25 +4,22 @@ var assert = require('assert');
44var utils = require ( '../utils' ) ;
55
66/**
7- * Get all keys.
7+ * Return all keys in the database .
88 *
9- * **NOTE**
10- * Building an in-memory array of all keys may be expensive.
11- * Consider using `iterateKeys` instead.
9+ * **WARNING**: This method is not suitable for large data sets as all
10+ * key-values pairs are loaded into memory at once. For large data sets,
11+ * use `iterateKeys() ` instead.
1212 *
1313 * @param {Object } filter An optional filter object with the following
14- * properties:
15- * - `match` - glob string to use to filter returned keys, e.g. 'userid.*'
16- * All connectors are required to support `*` and `?`.
17- * They may also support additional special characters that are specific
18- * to the backing store.
14+ * @param {String } filter.match Glob string used to filter returned
15+ * keys (i.e. `userid.*`). All connectors are required to support `*` and
16+ * `?`, but may also support additional special characters specific to the
17+ * database.
1918 * @param {Object } options
20- * @callback callback
21- * @param {Error= } err
22- * @param {[String] } keys The list of keys.
23- *
19+ * @callback {Function } callback
2420 * @promise
2521 *
22+ *
2623 * @header KVAO.keys(filter, callback)
2724 */
2825module . exports = function keyValueKeys ( filter , options , callback ) {
@@ -57,4 +54,3 @@ module.exports = function keyValueKeys(filter, options, callback) {
5754
5855 return callback . promise ;
5956} ;
60-
0 commit comments