implemented consistency checks

This commit is contained in:
azivner
2017-12-14 22:16:26 -05:00
parent 581f406a24
commit d1329de760
9 changed files with 76 additions and 7 deletions
+7 -1
View File
@@ -155,10 +155,16 @@ async function getMap(query, params = []) {
return map;
}
async function getFlattenedResults(key, query, params = []) {
async function getFlattenedResults(query, params = []) {
const list = [];
const result = await getResults(query, params);
if (result.length === 0) {
return list;
}
const key = Object.keys(result[0])[0];
for (const row of result) {
list.push(row[key]);
}