level-sublevel
Advanced tools
Comparing version 6.3.11 to 6.3.12
{ | ||
"name": "level-sublevel", | ||
"description": "partition levelup databases", | ||
"version": "6.3.11", | ||
"version": "6.3.12", | ||
"homepage": "https://github.com/dominictarr/level-sublevel", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -45,3 +45,3 @@ # level-sublevel | ||
This can be used to copy an old level-sublevel into a the format. | ||
This can be used to copy an old level-sublevel into the new format. | ||
@@ -52,3 +52,3 @@ ## Stability | ||
This module is working well, but may change in the future as its use is futher explored. | ||
This module is working well, but may change in the future as its use is further explored. | ||
@@ -65,10 +65,6 @@ ## Example | ||
//put a key into the main levelup | ||
db.put(key, value, function () { | ||
}) | ||
db.put(key, value, function () {}) | ||
//put a key into the sub-section! | ||
sub.put(key2, value, function () { | ||
}) | ||
sub.put(key2, value, function () {}) | ||
``` | ||
@@ -100,4 +96,4 @@ | ||
type: 'put', | ||
prefix: sub //NOTE pass the destination db to add | ||
//and the value will end up in that subsection! | ||
// NOTE: pass the destination db to add the value to that subsection! | ||
prefix: sub | ||
}) | ||
@@ -107,13 +103,8 @@ }) | ||
db.put('key', 'VALUE', function (err) { | ||
//read all the records inserted by the hook! | ||
sub.createReadStream() | ||
.on('data', console.log) | ||
// read all the records inserted by the hook! | ||
sub.createReadStream().on('data', console.log) | ||
}) | ||
``` | ||
Notice that `sub` is the second argument to `add`, | ||
which tells the hook to save the new record in the `sub` section. | ||
Notice that the `prefix` property to `add()` is set to `sub`, which tells the hook to save the new record in the `sub` section. | ||
@@ -124,3 +115,3 @@ ## Batches | ||
if set, this row will be inserted into that database section, | ||
instead of the current section. | ||
instead of the current section, similar to the `pre` hook above. | ||
@@ -127,0 +118,0 @@ ``` js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77073
126