News for hackers. Stuff that matters.
Re:Sqlc: Compile SQL to type-safe code by slaymaker1907 on Tuesday September 10, 2024 @12:55PM (#41502915)
You missed the ole' reliable, temp tables. I always end up using them heavily for non-trivial analytic queries since it gives you so much control over query execution.

In terms of actually using SQL more effectively, I think the ideal is just a small utility to use reflection and map a ResultSet (or equivalent) into a strongly typed object using reflection.

Even inserts can get tricky because there are so many different knobs you can tune. It's pretty rare that people just need to insert into a single table with no additional selects beforehand which means there is room to play around with preemptive locking, isolation level, etc.

There are no comments on this comment yet.