Typescript for a generic db client and infer the database schema? #892
Unanswered
binaryartifex
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Im using drizzle in a nrwl/nx monorepo and have it tucked away in its own util-db-client library. im using planetscale as the client for reference. is there a way to infer the database schema in its entirety? i have each of my tables in their own file and some have relations implementations so doing
also includes the relations. I have a connect utility that connects to a planetscale client and im currently inferring the schema from that as it somehow infers the database correctly. is there a way to pass a generic database client to other consuming libraries so i don't leak implementation (planetscale) details?
Beta Was this translation helpful? Give feedback.
All reactions