ismx-nexo-node-app 0.4.108 → 0.4.109
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -228,7 +228,7 @@ class RepositoryDatabasePostgres extends RepositoryDatabase_1.default {
|
|
|
228
228
|
let schema = this.tables[tableName][0].schema;
|
|
229
229
|
let { where, values } = this.toWhere(tableName, filters);
|
|
230
230
|
let query = `
|
|
231
|
-
SELECT json_object_agg(
|
|
231
|
+
SELECT json_object_agg(t.${select}, NULL) as list
|
|
232
232
|
FROM ( SELECT DISTINCT u.${select} FROM ${schema}.${tableName} u WHERE ${where} ) t`;
|
|
233
233
|
return this.query(query, values).then((result) => { var _a, _b; return new Repository_1.Hash((_b = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.list) !== null && _b !== void 0 ? _b : {}); });
|
|
234
234
|
});
|
package/package.json
CHANGED
|
@@ -199,7 +199,7 @@ export default class RepositoryDatabasePostgres extends RepositoryDatabase
|
|
|
199
199
|
let schema = this.tables[tableName][0].schema;
|
|
200
200
|
let { where, values } = this.toWhere(tableName, filters as any);
|
|
201
201
|
let query = `
|
|
202
|
-
SELECT json_object_agg(
|
|
202
|
+
SELECT json_object_agg(t.${select}, NULL) as list
|
|
203
203
|
FROM ( SELECT DISTINCT u.${select} FROM ${schema}.${tableName} u WHERE ${where} ) t`;
|
|
204
204
|
return this.query<{list:Record<Primitive, null>}>(query, values).then((result) => new Hash(result[0]?.list ?? {}));
|
|
205
205
|
}
|