Go Tool: (exploring) sqlc (Part 1)

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • sqlx

    general purpose extensions to golang's database/sql

  • 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:

  • pgx

    PostgreSQL driver and toolkit for Go

  • jackc/pgx PostgreSQL driver and toolkit for Go

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • pq

    Pure Go Postgres driver for database/sql

  • 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.

  • migrate

    Database migrations. CLI and Golang library.

  • golang-migrate/migrate Database migrations. CLI and Golang library.

  • sqlc

    Generate type-safe code from SQL

  • kyleconroy/sqlc Generate type safe Go from SQL

  • Squirrel

    Fluent SQL generation for golang

  • 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

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • factory_bot

    A library for setting up Ruby objects as test data.

  • 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.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts