Open kingyue737 opened 4 months ago
For usage with Postgres, it is already supported. It may seem like it works only with SQLite, but I believe only dialects or something were used. I just wrote a passing test case for postgres to verify myself and it works like a charm.
https://github.com/unjs/db0/pull/55/commits/b59e7dbf4e43ad2c09e9a9b6a55fbb5eb62dd1b1
It seems that type is not correct.
Type PgColumn
is not asignable to SQLiteColumn
Sorry I forgot the reproduction:
Describe the feature
It seems that only sqlite is supported when using drizzle integrator from db0. https://github.com/unjs/db0/blob/fde26b536dcaa0f40af8646d66b62266f4a57f2f/src/integrations/drizzle/index.ts#L2
Is there a plan to support other databases?
I also have some questions. Since the discussion tab is not enabled, I post them here by the way.
What's the recommended way to integrate drizzle in nuxt server routes? Like following?
and then call
useDb
in every event handler?I'm already using drizzle and pg in my nuxt project. What extra benefits does db0 bring? Moving config from a utils module to nuxt/nitro config? Seamless switching from one database to another as now we have a uniform config interface?
Thanks in advance
Additional information