tasko/lib/db.ts

12 lines
331 B
TypeScript
Raw Normal View History

import { PrismaClient } from '@prisma/client/edge';
2024-03-17 04:48:01 +00:00
import { withAccelerate } from '@prisma/extension-accelerate';
2024-08-20 18:24:59 +00:00
import { withOptimize } from '@prisma/extension-optimize';
2024-02-15 02:30:10 +00:00
declare global {
var prisma: PrismaClient | undefined;
}
2024-08-20 18:24:59 +00:00
export const db = new PrismaClient()
.$extends(withAccelerate())
.$extends(withOptimize());