Updates
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { format } from "sql-formatter";
|
||||
import sqlGenerator from "../../functions/dsql/sql/sql-generator";
|
||||
import { APIResponseObject, DsqlCrudParam } from "../../types";
|
||||
import connDbHandler, { ConnDBHandlerQueryObject } from "../db/conn-db-handler";
|
||||
@@ -85,11 +86,11 @@ export default async function <
|
||||
: undefined,
|
||||
errors: res?.errors,
|
||||
queryObject: {
|
||||
sql: queryObject?.string,
|
||||
sql: format(queryObject?.string || "") || undefined,
|
||||
params: queryObject?.values,
|
||||
},
|
||||
countQueryObject: {
|
||||
sql: countQueryObject?.string,
|
||||
sql: format(countQueryObject?.string || "") || undefined,
|
||||
params: countQueryObject?.values,
|
||||
},
|
||||
count: isSuccess
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { format } from "sql-formatter";
|
||||
import sqlDeleteGenerator from "../../functions/dsql/sql/sql-delete-generator";
|
||||
import {
|
||||
APIResponseObject,
|
||||
@@ -94,7 +95,7 @@ export default async function dsqlCrud<
|
||||
success: Boolean(res.affectedRows),
|
||||
payload: res,
|
||||
queryObject: {
|
||||
sql: deleteQuery?.query || "",
|
||||
sql: format(deleteQuery?.query || ""),
|
||||
params: deleteQuery?.values || [],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user