-
This time it was related to speeding up our development (and testing!) workflow when using PostgreSQL as a persistent datastore. For context, we have been successfully using database/sql and jmoiron/sqlx, and both can get the work done but I'm always trying to find better tools to improve what we have. I've been doing this investigation for a few months already, and I did find some packages and tools, but because of the amount of options I haven't really had time to try them all. In the end what I'm looking for is tools/packages that:
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
jackc/pgx PostgreSQL driver and toolkit for Go
-
This driver has been on my radar for months already, I actually used it for the blog series Implementing Complex Pipelines in Go, the cool thing about pgx is that it also implements the interface types defined in database/sql so replacing what we have (which uses lib/pq) should be, in theory, not that difficult.
-
golang-migrate/migrate Database migrations. CLI and Golang library.
-
kyleconroy/sqlc Generate type safe Go from SQL
-
Masterminds/squirrel Fluent SQL generation for golang
-
dockertest
Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.
ory/dockertest Write better integration tests! Dockertest helps you boot up ephemeral docker images for your Go tests with minimal work
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
I will continue exploring sqlc as well as the other tools/packages mentioned above, another thing I'm also investigating is something similar to factory_bot for speeding up the default values required when testing PostgreSQL-related methods.