Comparing version 0.2.3 to 0.2.4
var once = require('once'), | ||
db = require('../db'), | ||
scan = require('./scan') | ||
db = require('../db') | ||
@@ -12,3 +11,3 @@ module.exports = function query(store, data, cb) { | ||
var i, keySchema, key, comparisonOperator, hashKey, rangeKey, indexAttrs, type, | ||
opts = {}, vals, itemDb = store.getItemDb(data.TableName), | ||
opts = {}, valStream, vals, itemDb = store.getItemDb(data.TableName), | ||
size = 0, capacitySize = 0, count = 0, lastItem | ||
@@ -84,3 +83,4 @@ | ||
vals = db.lazy(itemDb.createValueStream(opts), cb) | ||
valStream = itemDb.createValueStream(opts) | ||
vals = db.lazy(valStream, cb) | ||
@@ -122,2 +122,3 @@ vals = vals.filter(function(val) { | ||
var result = {Count: items.length} | ||
valStream.destroy() | ||
if (data.Select != 'COUNT') { | ||
@@ -124,0 +125,0 @@ if (data.IndexName) { |
@@ -10,3 +10,3 @@ var once = require('once'), | ||
var opts = {}, vals, scannedCount = 0, itemDb = store.getItemDb(data.TableName), | ||
var opts = {}, valStream, vals, scannedCount = 0, itemDb = store.getItemDb(data.TableName), | ||
size = 0, capacitySize = 0, exclusiveLexiKey, lastItem | ||
@@ -34,3 +34,4 @@ | ||
vals = db.lazy(itemDb.createValueStream(opts), cb) | ||
valStream = itemDb.createValueStream(opts) | ||
vals = db.lazy(valStream, cb) | ||
@@ -66,2 +67,3 @@ vals = vals.takeWhile(function(val) { | ||
var result = {Count: items.length, ScannedCount: scannedCount} | ||
valStream.destroy() | ||
if (data.Select != 'COUNT') result.Items = items | ||
@@ -68,0 +70,0 @@ if ((data.Limit && data.Limit <= scannedCount) || size > 1042000) { |
{ | ||
"name": "dynalite", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"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
2610
105192
35