[feat]: Unjoin drizzle-orm (schema definition and query build)
Feature description
Hi.
This is a great project. However using it on an existing codebases makes it very much difficult to adhere. For example, last week I integrated on my project which uses Supabase successfully converting to (postgrest query builder). It took me a few hours though.
However, there was a huge refactoring (44 files) recently to fix the count on filters, which made it mostly impossible to keep up. Also, currently there is much dead code (for example mostly of utils.ts). You could suggest me to use drizzle on the data-table specifically, and i would agree with that. I spent a few hours doing that, however, the code itself is also so much relied on the schema definition, which makes this almost an impossible task.
Even though i was willing to use drizzle to make it easier on the query builder part and make easier to maintain, turns down that i just cannot use it to define my table structure.
So in my humble opinion, code should be more detachable in the aspect of defining schema/and consuming the schema on query buillders. At the moment, they are much binded. At the end, in spite of being a great project, it mostly serves as an inspiration, because its very hard to adhere in current codebases, must be said.
What do you think?
Additional Context
Additional details here...
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues and PRs
it shouldn't be that hard to integrate with existing drizzle project.
the db utils stuffs were just a bunch of utils that i use for my other drizzle projects, you can just skip them if those are irrelevant to you.
you just need to update the schema, and the query, that should be enough.
in which parts are you having trouble implementing?
i can help you set it up, if you want
@tecoad want to start a fork actually? Literally in the middle of this (~80% done) right now, moving the whole thing to Supabase and came here for the same reason. LOTS of subtly required changes, not as easy as rip out Drizzle 🙁
i've been working on a primitive ui component library since the last week.
gonna push something more accessible within the next month.
also will add docs for the table and other stuffs.
@danielgwilson can you say which parts of it was difficult to swap out?