Update db-update function
This commit is contained in:
Vendored
+1
@@ -49,6 +49,7 @@ export default async function dbHandler({ query, values, config }) {
|
||||
single_res: res_array?.[0],
|
||||
insert_return,
|
||||
count,
|
||||
db_res: res,
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
Vendored
+1
@@ -72,6 +72,7 @@ export default async function DbUpdate({ table, data, query, targetId, config, }
|
||||
config,
|
||||
});
|
||||
return {
|
||||
...res,
|
||||
...updated_res,
|
||||
debug: {
|
||||
sqlObj,
|
||||
|
||||
Vendored
+1
@@ -1410,6 +1410,7 @@ export type DBResponseObject<T extends {
|
||||
msg?: string;
|
||||
debug?: any;
|
||||
count?: number;
|
||||
db_res?: any;
|
||||
};
|
||||
export type DBInsertReturn = {
|
||||
count?: number;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/bun-mariadb",
|
||||
"version": "1.0.14",
|
||||
"version": "1.0.15",
|
||||
"description": "Schema-driven MariaDB manager for Bun",
|
||||
"author": "Benjamin Toby",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -75,6 +75,7 @@ export default async function dbHandler<
|
||||
single_res: res_array?.[0],
|
||||
insert_return,
|
||||
count,
|
||||
db_res: res,
|
||||
};
|
||||
} catch (error: any) {
|
||||
return {
|
||||
|
||||
@@ -122,6 +122,7 @@ export default async function DbUpdate<
|
||||
});
|
||||
|
||||
return {
|
||||
...res,
|
||||
...updated_res,
|
||||
debug: {
|
||||
sqlObj,
|
||||
|
||||
@@ -1618,6 +1618,7 @@ export type DBResponseObject<
|
||||
msg?: string;
|
||||
debug?: any;
|
||||
count?: number;
|
||||
db_res?: any;
|
||||
};
|
||||
|
||||
export type DBInsertReturn = {
|
||||
|
||||
Reference in New Issue
Block a user