Comparing database/sql, GORM, sqlx, and sqlc

This page summarizes the projects mentioned and recommended in the original post on /r/golang

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

    Generate a Go ORM tailored to your database schema.

  • Moved all my projects to https://github.com/volatiletech/sqlboiler.

  • jet

    Type safe SQL builder with code generation and automatic query result data mapping

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

    A Simple and Powerful Golang SQL Library (by VinGarcia)

  • Has anyone given a serious look into ksql? https://github.com/VinGarcia/ksql

  • ent

    An entity framework for Go

  • Personally, I've used a mix of these tools: GORM, Pop, and ent. I think so far, https://entgo.io/ has to be my favorite. I found the learning curve to be pretty straightforward and like how you can represent fairly complex relationships because of the data model and code generation capabilities they have. Also, automatic migrations with a choice to generate migration files. Although, I don't think there's as big of a community around this tooling.

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