Re:Show HN: Welcome, Cot: the Rust web framework for lazy de...
by norman784 on Tuesday February 18, 2025 @09:44AM
(#43090027)
> Yes, the example from the documentation is slightly more complicated, but it checks at compile time the exact column names and types, so you get feedback much quicker than actually running the SQL query.
Well sqlx checks at compile time your raw query if you use their macro, at the expense of increased compile times.
Re:Show HN: Welcome, Cot: the Rust web framework for lazy de...
by iterateoften on Tuesday February 18, 2025 @09:45AM
(#43090046)
I never understood the hate against ORMs. It always seems like a superiority complex or some claim that SQL is “so simple”.
Yeah SQL is extremely simple to write, that isn’t really the problem ORMs solve for me, but rather they solve composability and reuse of queries.
I think there is a similar vein of people crying about sites not using 100% vanilla js without a framework. They are missing the point or don’t have enough experience with the actual problems the abstractions solve.
Re:Show HN: Welcome, Cot: the Rust web framework for lazy de...
by stop50 on Tuesday February 18, 2025 @10:46AM
(#43090850)
I am confident in easy SELECT queries, even with multiple tables, but once i have to use JOIN or other advanced things my queries are a mess, returning data i never expected.
Re:Show HN: Welcome, Cot: the Rust web framework for lazy de...
by zanellato19 on Tuesday February 18, 2025 @09:49PM
(#43098002)
This is one of my biggest pet peeves against HN. It's also obvious ORMS won, every new framework creates them. People who keep speaking about not using them are crazy.
In addition to that, over the years of writing web services, I always found raw queries much less maintainable. The ORM immediately tells you that you messed up your refactoring, whether it is just renaming a column, or removing a table completely.
Pretty much every ORM (including the one in Cot) also allows you to write your own custom queries if the abstractions are not enough, so there's always this fallback option.