Hacker News new | ask | show | jobs
by swah 2999 days ago
What about 90% of cases being simple CRUD and 10% you just do the usual "raw SQL query"?

I've chosen this path of using only sqlx on my current work project (only me) and regret it, because so much typing..

2 comments

I also work alone on a Go service and have some complex models. I used Gorm and then for complex selects broke out the raw sql. It works okay, I’m still having to bolt on things like OCC and Versioning to my models. I’m glad I used it though- it gave me a solid foundation to work off and replace the bits that don’t quite work well.
I use Masterminds' squirrel library to build up queries which cuts down on the amount of hand written SQL I need.