Is there any way of making queries without passing those table objects around? #627
-
In Kysely I just need to pass table string and I'm done. I use Mikro-Orm for defining schema and kysely for making actual queries, while it's schema is generated with kysely-codegen. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What do you mean? Do you want to make raw sql queries?
With Drizzle you are DRY unlike your current workflow. With Drizzle you define the schema once and then, have type-safe queries without any codegen and/or need to inspect the DB to get the types (what kysely-codengen needs to do). |
Beta Was this translation helpful? Give feedback.
@mkieblesz if you like Kysely approach more, but still want to have drizzle schemas as a source of truth - you can have it!
We just creating Kysely db from drizzle schemas and then use it as a kysely package itself
https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/kysely/README.md