ismx-nexo-node-app 0.4.75 → 0.4.77
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.
|
@@ -157,7 +157,7 @@ class RepositoryDatabasePostgres extends RepositoryDatabase_1.default {
|
|
|
157
157
|
return Object.prototype.hasOwnProperty.call(object, camelKey);
|
|
158
158
|
});
|
|
159
159
|
if (columns.length === 0)
|
|
160
|
-
|
|
160
|
+
return this.one(tableName, id);
|
|
161
161
|
const params = columns.map((_, index) => `\$${index + 2}`).join(",");
|
|
162
162
|
const values = [id, ...columns.map((column) => object[PostgresUtils_1.default.snakeToCamel(column)])];
|
|
163
163
|
const query = `UPDATE ${schema}.${tableName} SET (${columns.join(",")}) = ROW(${params}) WHERE id = $1 RETURNING *`;
|
package/package.json
CHANGED
|
@@ -131,7 +131,7 @@ export default class RepositoryDatabasePostgres extends RepositoryDatabase
|
|
|
131
131
|
return Object.prototype.hasOwnProperty.call(object, camelKey);
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
-
if (columns.length === 0)
|
|
134
|
+
if (columns.length === 0) return this.one(tableName, id);
|
|
135
135
|
|
|
136
136
|
const params = columns.map((_, index) => `\$${index + 2}`).join(",");
|
|
137
137
|
const values = [ id, ...columns.map((column) => object[PostgresUtils.snakeToCamel(column) as keyof T]) ];
|