Comparing version 0.2.1 to 0.2.2
@@ -95,23 +95,13 @@ | ||
try { | ||
var shouldContinue = true; | ||
cursor.goToRange(str); | ||
// Go the the first occourence of `str` and iterate from there | ||
for (var found = cursor.goToRange(str); found; found = cursor.goToNext()) { | ||
// Stop the loop if the current key is no longer what we're looking for | ||
if (found !== str) | ||
break; | ||
while (shouldContinue) { | ||
cursor.getCurrentNumber(function(key, data) { | ||
//console.log(key.length, str.length, key == str); | ||
if (key !== str) { | ||
shouldContinue = false; | ||
} | ||
else { | ||
results.push(data); | ||
} | ||
}); | ||
cursor.goToNext(); | ||
} | ||
// Get current data item and push it to results | ||
cursor.getCurrentNumber(function(key, data) { | ||
results.push(data); | ||
}); | ||
} | ||
catch (err) { | ||
console.log(err); | ||
// Error here only means that we've reached the end | ||
} | ||
@@ -118,0 +108,0 @@ cursor.close(); |
@@ -31,2 +31,6 @@ | ||
var stat = dbi.stat(txn); | ||
console.log("\ndatabase statistics:"); | ||
console.dir(stat); | ||
if (data === null) { | ||
@@ -51,2 +55,1 @@ // Put data | ||
env.close(); | ||
@@ -13,5 +13,5 @@ { | ||
"repository": "https://github.com/Venemo/node-lmdb", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"main": "./build/Release/node-lmdb", | ||
"gypfile": true | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
520917
544