fix query raw unsafe

This commit is contained in:
Rizky
2024-04-02 04:18:37 +07:00
parent e8a8ad56e5
commit e20ea7abaf
+3
View File
@@ -195,6 +195,9 @@ export const execQuery = async (args: DBArg, prisma: any) => {
if (tableInstance) {
if (action === "query" && table.startsWith("$query")) {
try {
if (table === "$queryRawUnsafe") {
return await prisma.$queryRawUnsafe(params[0]);
}
const q = params.shift();
return await tableInstance.bind(prisma)(Prisma.sql(q, ...params));
} catch (e) {