how to avoid writing dreadful SQL statements

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

    Generate type-safe code from SQL

  • Use something that does codegen, like sqlc or Bob.

  • bob

    SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite (by stephenafamo)

  • Use something that does codegen, like sqlc or Bob.

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

    Simple Query Builder for PostgreSQL - WIP (by andrewpillar)

  • I have written about this before, and my thoughts always settle on using a query builder. I've built a simple one, which works for what I need, but there are more feature complete ones out there such as squirrel. I've also written about how you can implement a simple CRUD library for database interactions using generics and query building to have that nice middle-ground between an ORM and query building.

  • Squirrel

    Fluent SQL generation for golang

  • I have written about this before, and my thoughts always settle on using a query builder. I've built a simple one, which works for what I need, but there are more feature complete ones out there such as squirrel. I've also written about how you can implement a simple CRUD library for database interactions using generics and query building to have that nice middle-ground between an ORM and query building.

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