Prisma Output SQL query

轉左用 NodeJs 之後就發現 Entity Framework 有多好
之前用 EF 很方便便可以知道 EF Generate 果條 係Prisma 度點先可以Log 到條query 呢?

解決方便 我們只需要在declare Prisma Client 時加上 log query 這個 parameter 便可:

const prisma = new PrismaClient({ log: ['query'] });

Hope you find it useful

Chi Yau
Chi Yau
Software Engineer

Interested on Learning new stuff and experience sharing