What SQL library are you using?

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

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

    SQL-first Golang ORM (by uptrace)

  • I usually work with PostgreSQL and have used https://github.com/go-pg/pg. https://github.com/uptrace/bun is its successor.

  • jet

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

  • jet

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

    An entity framework for Go

  • pgx

    PostgreSQL driver and toolkit for Go

  • I use postgres & now settled on jackc/pgx. Prisma was my favourite before they terminated development so ended up just learning to use raw SQL statements.

  • sqlc

    Generate type-safe code from SQL

  • I tried SQLC but generating fields with pointers instead of sql.Null* is a pain + custom types is also difficult to get working with the Value/Scanner interface.

  • GORM

    The fantastic ORM library for Golang, aims to be developer friendly

  • GORM is the best, it features an ORM database with syntax similar to ruby on rails.

  • goqu

    SQL builder and query library for golang

  • Pgx + Goqu

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

    igor is an abstraction layer for PostgreSQL with a gorm like syntax.

  • The one I created since I only use PostgreSQL: https://github.com/galeone/igor

  • sqlf

    sqlf generates parameterized SQL statements in Go, sprintf style

  • go-pg

    Golang ORM with focus on PostgreSQL features and performance

  • I usually work with PostgreSQL and have used https://github.com/go-pg/pg. https://github.com/uptrace/bun is its successor.

  • ozzo-dbx

    A Go (golang) package that enhances the standard database/sql package by providing powerful data retrieval methods as well as DB-agnostic query building capabilities.

  • If you are looking for a query builder only, I also could recommend https://github.com/go-ozzo/ozzo-dbx (it doesn't seem to be maintained but its stable and so far I haven't stumbled on a bug using it for an internal tool)

  • go-sqlite-lite

    SQLite driver for the Go programming language

  • kala-go

    An authorization framework written in Go based on Google's Zanzibar.

  • Can highly recommend Ent, I've used to build a Google Zanzibar clone and it was awesome to work with. https://github.com/DeluxeOwl/kala-go

  • Squirrel

    Fluent SQL generation for golang

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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