Our great sponsors
-
I basically use the db/sql package/interface, but I use sqlx for its StructScan ability that will scan straight into my db struct rather than having to scan into the individual fields.
-
sqlc for Postgresql databases is really nice. MySQL also works but has more issues and currently they are working on SQLite support.
-
InfluxDB
Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
-
sqlf for building parameterized queries, yet to settle on a row-to-struct mapper, doing it manually for now
-
I like and use https://github.com/zombiezen/go-sqlite for CGo-free SQLite. It avoids some of the problems database/sql has, discussed here: https://crawshaw.io/blog/go-and-sqlite.
-
sqlx has worked pretty well for me if you are looking for a fairly light wrapper. I wish there was an equivalent of the dapper library for C#/.NET.
-
Though, i've would give a try to bun
-
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server (by xo)
i use xo . Reason is i prefer designing schema first and creating golang scaffolding later. Xo takes schema and gives me basic create/update/delete operations by default and i can also generate gocode for any sql queries that i write.
-
Mergify
Updating dependencies is time-consuming.. Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.
-
We have used squirrel (https://github.com/Masterminds/squirrel) for query building and sqlx as a database/sql wrapper quite extensively.
-
That's what I'm trying to remove with sqly (Scully). But it's mostly a PoC at this moment.