Actual example use cases for a curated list of golang sql builder/generator/scanner/helper libraries
For static queries, try sqlc
.
For dynamic queries, try go-sqlbuilder
, squirrel
, or jet
to craft the SQL string and args slice, then use scany
or ksql
to run the query and scan to a struct/slice.
- github.com/georgysavva/scany/v2
- github.com/vingarcia/ksql
- github.com/blockloop/scan
- github.com/jmoiron/sqlx
- github.com/bokwoon95/sq Queries have errors.
- github.com/lqs/sqlingo Failed to generate files for postgres.