Comparing version 3.0.4 to 3.0.5
{ | ||
"name": "jembadb", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "Json Embeddable Appendable Database", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -739,6 +739,4 @@ 'use strict'; | ||
const shardResult = []; | ||
if (query.count) { | ||
shardResult.push({count: this.infoShard.count}); | ||
} | ||
let totalCount = 0; | ||
//select from shards | ||
@@ -758,4 +756,6 @@ for (const shard of selectedShards) { | ||
if (query.count) { | ||
for (const row of rows) | ||
for (const row of rows) { | ||
row.shard = shard; | ||
totalCount += row.count; | ||
} | ||
} | ||
@@ -769,2 +769,6 @@ | ||
if (query.count) { | ||
shardResult.unshift({count: totalCount}); | ||
} | ||
let result = [].concat(...shardResult); | ||
@@ -771,0 +775,0 @@ |
181385
4772