Content pfp
Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions

matt 💭 pfp
matt 💭
@matthewmorek
i'm wondering why the hell Drizzle is even called an ORM when it's so limited in querying relations that you have to basically do everything yourself AND on top of that KNOW your SQL very well? a good ORM allows you to query USING RELATIONS, not using SQL — that's the whole fucking point. look at Ruby on Rails, they practically invented the modern ORM approach. an engineer requiring data for their frontend should not have to know which type of JOIN query is appropriate for their given task; they should be able to say "i need to find a USER by ID and fetch all their VOTES" and be done with it. instead, we're told to chain some SQL-like methods and check SQL docs every 5 secs to make sure we've used LEFT JOIN instead of LATERAL JOIN for a subquery. what year is this? and don't get me started on the lack of end-to-end TypeScript safety. If you've ever written a bunch of DTOs just to get some shit from Postgres, you know exactly what I mean. /rant
1 reply
1 recast
3 reactions

matt 💭 pfp
matt 💭
@matthewmorek
now, you're probably expecting i give you an alternative... and I do have one. give Orchid ORM a star (and definitely a test drive). be warned though: once you set it up and begin to use it you may not be able to look at ORM/query builders the same way again (or at all). https://github.com/romeerez/orchid-orm
0 reply
0 recast
1 reaction