Update SQL handlers debugging

This commit is contained in:
2026-04-05 07:19:26 +01:00
parent 685d47d91f
commit b3bd5866e6
9 changed files with 72 additions and 32 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ import DbClient from ".";
import _ from "lodash";
import sqlGenerator from "../../utils/sql-generator";
export default async function DbSelect({ table, query, count, targetId, }) {
let sqlObj = null;
try {
let finalQuery = query || {};
if (targetId) {
@@ -14,7 +15,7 @@ export default async function DbSelect({ table, query, count, targetId, }) {
},
});
}
const sqlObj = sqlGenerator({
sqlObj = sqlGenerator({
tableName: table,
genObject: finalQuery,
count,
@@ -43,6 +44,9 @@ export default async function DbSelect({ table, query, count, targetId, }) {
return {
success: false,
error: error.message,
debug: {
sqlObj,
},
};
}
}