drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
24.61k stars 649 forks source link

[FEATURE]: Multisets (jOOQ) #3583

Open oliveryasuna opened 2 days ago

oliveryasuna commented 2 days ago

Feature hasn't been suggested before.

Describe the enhancement you want to request

We come from the Java ecosystem, which has an absolutely wonderful tool called jOOQ. As we consider writing Node-based backends, Drizzle is the natural choice as it basically implements the same pattern: thin layer on top of SQL (+ other useful features).

One of jOOQ incredibly useful features is Multisets: https://blog.jooq.org/jooq-3-15s-new-multiset-operator-will-change-how-you-think-about-sql/. While it definitely has its pitfalls, if used correctly, it can be absurdly useful.

How feasible would it be to implement this in Drizzle? Does Drizzle offer a way to extend it's syntax?