11 lines
313 B
TypeScript
11 lines
313 B
TypeScript
import { OnModuleInit } from "@nestjs/common";
|
|
import { PrismaClient } from "@prisma/client";
|
|
|
|
export class PrismaService extends PrismaClient implements OnModuleInit {
|
|
async onModuleInit() {
|
|
await this.$connect();
|
|
const tables = await this.$queryRawUnsafe('.tables');
|
|
console.log({ tables })
|
|
}
|
|
}
|