Comparing version 0.2.4 to 0.2.5
@@ -11,3 +11,3 @@ var once = require('once'), | ||
var i, keySchema, key, comparisonOperator, hashKey, rangeKey, indexAttrs, type, | ||
opts = {}, valStream, vals, itemDb = store.getItemDb(data.TableName), | ||
opts = {}, vals, itemDb = store.getItemDb(data.TableName), | ||
size = 0, capacitySize = 0, count = 0, lastItem | ||
@@ -83,4 +83,3 @@ | ||
valStream = itemDb.createValueStream(opts) | ||
vals = db.lazy(valStream, cb) | ||
vals = db.lazy(itemDb.createValueStream(opts), cb) | ||
@@ -122,3 +121,2 @@ vals = vals.filter(function(val) { | ||
var result = {Count: items.length} | ||
valStream.destroy() | ||
if (data.Select != 'COUNT') { | ||
@@ -125,0 +123,0 @@ if (data.IndexName) { |
@@ -10,3 +10,3 @@ var once = require('once'), | ||
var opts = {}, valStream, vals, scannedCount = 0, itemDb = store.getItemDb(data.TableName), | ||
var opts = {}, vals, scannedCount = 0, itemDb = store.getItemDb(data.TableName), | ||
size = 0, capacitySize = 0, exclusiveLexiKey, lastItem | ||
@@ -34,4 +34,3 @@ | ||
valStream = itemDb.createValueStream(opts) | ||
vals = db.lazy(valStream, cb) | ||
vals = db.lazy(itemDb.createValueStream(opts), cb) | ||
@@ -67,3 +66,2 @@ vals = vals.takeWhile(function(val) { | ||
var result = {Count: items.length, ScannedCount: scannedCount} | ||
valStream.destroy() | ||
if (data.Select != 'COUNT') result.Items = items | ||
@@ -70,0 +68,0 @@ if ((data.Limit && data.Limit <= scannedCount) || size > 1042000) { |
@@ -86,3 +86,5 @@ var crypto = require('crypto'), | ||
if (errHandler) stream.on('error', errHandler) | ||
return lazy(stream) | ||
var streamAsLazy = lazy(stream) | ||
if (stream.destroy) streamAsLazy.on('pipe', stream.destroy.bind(stream)) | ||
return streamAsLazy | ||
} | ||
@@ -89,0 +91,0 @@ |
{ | ||
"name": "dynalite", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "A mock implementation of Amazon's DynamoDB built on LevelDB", | ||
@@ -5,0 +5,0 @@ "main": "index.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
105175
2608