Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat]: Unjoin drizzle-orm (schema definition and query build) #652

Open
2 tasks done
tecoad opened this issue Oct 24, 2024 · 1 comment
Open
2 tasks done

[feat]: Unjoin drizzle-orm (schema definition and query build) #652

tecoad opened this issue Oct 24, 2024 · 1 comment

Comments

@tecoad
Copy link

tecoad commented Oct 24, 2024

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

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
@tecoad tecoad changed the title [feat]: Unjoin drizzle-orm from the query build [feat]: Unjoin drizzle-orm (schema definition and query build) Oct 24, 2024
@sadmann7
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants