This commit is contained in:
2026-03-08 14:23:50 +01:00
parent b583fefe89
commit 835458cc14
3 changed files with 13 additions and 5 deletions
+6 -2
View File
@@ -21,6 +21,7 @@ function DbSelect(_a) {
return __awaiter(this, arguments, void 0, function* ({ table, query, count, targetId, }) {
var _b;
let sql;
let sqlObj;
try {
let finalQuery = query || {};
if (targetId) {
@@ -32,7 +33,7 @@ function DbSelect(_a) {
},
});
}
const sqlObj = (0, sql_generator_1.default)({
sqlObj = (0, sql_generator_1.default)({
tableName: table,
genObject: finalQuery,
count,
@@ -60,7 +61,10 @@ function DbSelect(_a) {
return {
success: false,
error: error.message,
debug: { sql },
debug: {
sql,
sqlObj,
},
};
}
});
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@moduletrace/nsqlite",
"version": "1.0.7",
"version": "1.0.8",
"description": "SQLite manager for Node JS",
"author": "Benjamin Toby",
"main": "dist/index.js",
+6 -2
View File
@@ -24,6 +24,7 @@ export default async function DbSelect<
targetId,
}: Params<Schema, Table>): Promise<APIResponseObject<Schema>> {
let sql: string | undefined;
let sqlObj: any | undefined;
try {
let finalQuery = query || {};
@@ -41,7 +42,7 @@ export default async function DbSelect<
);
}
const sqlObj = sqlGenerator({
sqlObj = sqlGenerator({
tableName: table,
genObject: finalQuery,
count,
@@ -76,7 +77,10 @@ export default async function DbSelect<
return {
success: false,
error: error.message,
debug: { sql },
debug: {
sql,
sqlObj,
},
};
}
}