fix query raw unsafe
This commit is contained in:
@@ -195,6 +195,9 @@ export const execQuery = async (args: DBArg, prisma: any) => {
|
|||||||
if (tableInstance) {
|
if (tableInstance) {
|
||||||
if (action === "query" && table.startsWith("$query")) {
|
if (action === "query" && table.startsWith("$query")) {
|
||||||
try {
|
try {
|
||||||
|
if (table === "$queryRawUnsafe") {
|
||||||
|
return await prisma.$queryRawUnsafe(params[0]);
|
||||||
|
}
|
||||||
const q = params.shift();
|
const q = params.shift();
|
||||||
return await tableInstance.bind(prisma)(Prisma.sql(q, ...params));
|
return await tableInstance.bind(prisma)(Prisma.sql(q, ...params));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user