mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 09:11:38 +00:00
21 lines
335 B
JavaScript
21 lines
335 B
JavaScript
import prismaClient from '@prisma/client';
|
|
const { PrismaClient } = prismaClient;
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
async function main() {
|
|
const content = await prisma.posts.findMany({
|
|
select: {
|
|
tags: {
|
|
select: {
|
|
name: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
console.log(content);
|
|
}
|
|
|
|
main().then();
|