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],
|
single_res: res_array?.[0],
|
||||||
insert_return,
|
insert_return,
|
||||||
count,
|
count,
|
||||||
|
db_res: res,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|||||||
Vendored
+1
@@ -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,
|
||||||
|
|||||||
Vendored
+1
@@ -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
@@ -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",
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ export default async function DbUpdate<
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
...res,
|
||||||
...updated_res,
|
...updated_res,
|
||||||
debug: {
|
debug: {
|
||||||
sqlObj,
|
sqlObj,
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user