A type-safe struct mapper and query builder for Go (using generics)
This library is the spiritual successor to the one we covered late last year, now with generics.
SQL and Go
This library is the spiritual successor to the one we covered late last year, now with generics.
From reading through the README, this seems like a nice balance between a full-blown ORM and hand-rolling all your own SQL. For example, this point from the The mapper function is the SELECT clause. section:
In sq whatever you SELECT is automatically mapped. This means you just have to write your query, execute it and if there were no errors, the data is already in your Go variables. No iterating rows, no specifying column scan order, no error checking three times. Write your query, run it, you’re done.