diff --git a/pkgs/utils/query.ts b/pkgs/utils/query.ts index ce743d7..f3168ba 100644 --- a/pkgs/utils/query.ts +++ b/pkgs/utils/query.ts @@ -24,9 +24,15 @@ export const execQuery = async (args: DBArg, prisma: any) => { mode: "field" | "raw"; }; }; + if (arg) { const { table, where, data } = arg; - const mode = arg.mode || "field"; + let mode = arg.mode || "field"; + + if (mode !== "field") { + mode = "raw"; + } + if (table && where && data) { const transactions = []; const tx_delete_index = new Set(); @@ -51,6 +57,7 @@ export const execQuery = async (args: DBArg, prisma: any) => { } } } + if ( col.type === "attribute" && col.name === "id" &&