DrPotat
DTDrizzle Team
•Created by rushil1o1 on 3/28/2023 in #help
Any easy way to create a typescript ENUM type from pgEnum?
Btw @rushil1o1 here's another way to get the values type of a pgEnum, by inspecting the table types instead of using a helper like
strEnum
: https://discord.com/channels/1043890932593987624/1138161535416553585/114874389769093140015 replies
DTDrizzle Team
•Created by tmcw on 8/7/2023 in #help
Is there a simpler way to get an enum type than (typeof enumType)["enumValues"][number]?
I wish there was a way to get this type directly from the
pgEnum
though7 replies
DTDrizzle Team
•Created by tmcw on 8/7/2023 in #help
Is there a simpler way to get an enum type than (typeof enumType)["enumValues"][number]?
For example:
7 replies
DTDrizzle Team
•Created by tmcw on 8/7/2023 in #help
Is there a simpler way to get an enum type than (typeof enumType)["enumValues"][number]?
Another (indirect) way to get the enum values type is by inspecting the table's type:
7 replies
DTDrizzle Team
•Created by tmcw on 8/7/2023 in #help
Is there a simpler way to get an enum type than (typeof enumType)["enumValues"][number]?
Thanks a lot for sharing @Noahh - those snippets are super useful
7 replies
Prisma and deno
Seems like there's interest in Drizzle on Deno but not sure how well it works atm:
https://github.com/drizzle-team/drizzle-orm/issues/252
22 replies
Prisma and deno
We've faced a couple issues with Prisma on Deno:
1 Difficulties importing enums from Prisma client. There seems to be some typing mismatch that prevents us from importing them
2 We need to use Prisma Data Proxy to connect to the database. Otherwise, the Prisma Client generation doesn't work.
22 replies