Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nestjs prisma on query

@Injectable()
export class TestService {
  constructor(private prismaService: PrismaService) {
    prismaService.$on<any>('query', (event: Prisma.QueryEvent) => {
      console.log('Query: ' + event.query);
      console.log('Duration: ' + event.duration + 'ms');
    });
  }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nestjs #prisma #query
ADD COMMENT
Topic
Name
6+1 =