Update db-update function

This commit is contained in:
2026-08-08 16:33:37 +01:00
parent 4d85a69505
commit 90fcd3867d
7 changed files with 7 additions and 1 deletions
+1
View File
@@ -49,6 +49,7 @@ export default async function dbHandler({ query, values, config }) {
single_res: res_array?.[0], single_res: res_array?.[0],
insert_return, insert_return,
count, count,
db_res: res,
}; };
} }
catch (error) { catch (error) {
+1
View File
@@ -72,6 +72,7 @@ export default async function DbUpdate({ table, data, query, targetId, config, }
config, config,
}); });
return { return {
...res,
...updated_res, ...updated_res,
debug: { debug: {
sqlObj, sqlObj,
+1
View File
@@ -1410,6 +1410,7 @@ export type DBResponseObject<T extends {
msg?: string; msg?: string;
debug?: any; debug?: any;
count?: number; count?: number;
db_res?: any;
}; };
export type DBInsertReturn = { export type DBInsertReturn = {
count?: number; count?: number;
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/bun-mariadb", "name": "@moduletrace/bun-mariadb",
"version": "1.0.14", "version": "1.0.15",
"description": "Schema-driven MariaDB manager for Bun", "description": "Schema-driven MariaDB manager for Bun",
"author": "Benjamin Toby", "author": "Benjamin Toby",
"license": "MIT", "license": "MIT",
+1
View File
@@ -75,6 +75,7 @@ export default async function dbHandler<
single_res: res_array?.[0], single_res: res_array?.[0],
insert_return, insert_return,
count, count,
db_res: res,
}; };
} catch (error: any) { } catch (error: any) {
return { return {
+1
View File
@@ -122,6 +122,7 @@ export default async function DbUpdate<
}); });
return { return {
...res,
...updated_res, ...updated_res,
debug: { debug: {
sqlObj, sqlObj,
+1
View File
@@ -1618,6 +1618,7 @@ export type DBResponseObject<
msg?: string; msg?: string;
debug?: any; debug?: any;
count?: number; count?: number;
db_res?: any;
}; };
export type DBInsertReturn = { export type DBInsertReturn = {