We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab90b98 commit 99f7912Copy full SHA for 99f7912
1 file changed
test/query.ts
@@ -0,0 +1,30 @@
1
+import { PrismaPg } from "@prisma/adapter-pg";
2
+import { PrismaClient } from "generated/prisma/client";
3
+import { config } from "src/config/app.config";
4
+
5
+class PrismaQuery {
6
+ private readonly adapter: PrismaPg;
7
+ private readonly prisma: PrismaClient;
8
9
+ constructor() {
10
+ this.adapter = new PrismaPg({
11
+ connectionString: config.db.url,
12
+ });
13
+ this.prisma = new PrismaClient({ adapter: this.adapter });
14
+ }
15
16
+ async run() {
17
+ const getAllApp = await this.prisma.applicationInfo.findMany({
18
+ where: {
19
+ std_info_education_level: {
20
+ not: null,
21
+ },
22
23
24
25
+ console.log(new Set(getAllApp.map((q) => decodeURI(q.std_info?.std_info_education_level || ""))));
26
27
+}
28
29
+const prismaQuery = new PrismaQuery();
30
+prismaQuery.run();
0 commit comments