sqlc

Generate type-safe code from SQL (by sqlc-dev)

Sqlc Alternatives

Similar projects and alternatives to sqlc

  1. go

    2,267 sqlc VS go

    The Go programming language

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. htmx

    644 sqlc VS htmx

    </> htmx - high power tools for HTML

  4. FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  5. ent

    146 sqlc VS ent

    An entity framework for Go

  6. sqlx

    151 sqlc VS sqlx

    🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)

  7. jOOQ

    99 sqlc VS jOOQ

    jOOQ is the best way to write SQL in Java

  8. GORM

    84 sqlc VS GORM

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

  9. SaaSHub

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

    SaaSHub logo
  10. migrate

    78 sqlc VS migrate

    Database migrations. CLI and Golang library.

  11. sqlx

    74 sqlc VS sqlx

    general purpose extensions to golang's database/sql

  12. pgx

    73 sqlc VS pgx

    PostgreSQL driver and toolkit for Go

  13. atlas

    74 sqlc VS atlas

    Manage your database schema as code (by ariga)

  14. Squirrel

    54 sqlc VS Squirrel

    Fluent SQL generation for golang

  15. SQLBoiler

    Generate a Go ORM tailored to your database schema.

  16. jet

    29 sqlc VS jet

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

  17. bud

    34 sqlc VS bud

    The Full-Stack Web Framework for Go

  18. goose

    30 sqlc VS goose

    A database migration tool. Supports SQL migrations and Go functions. (by pressly)

  19. pq

    29 sqlc VS pq

    Pure Go Postgres driver for database/sql

  20. goqu

    24 sqlc VS goqu

    SQL builder and query library for golang

  21. xo

    17 sqlc VS xo

    Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server

  22. bun

    18 sqlc VS bun

    SQL-first Golang ORM (by uptrace)

  23. 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 better sqlc alternative or higher similarity.

sqlc discussion

Log in or Post with

sqlc reviews and mentions

Posts with mentions or reviews of sqlc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2025-03-09.
  • Sqlc: Generate type-safe code from SQL
    1 project | news.ycombinator.com | 16 Apr 2025
  • sqlc: Type-Safe Querying in Go
    1 project | dev.to | 16 Mar 2025
  • Goravel: A Go framework inspired by Laravel
    9 projects | news.ycombinator.com | 9 Mar 2025
    What would you use if ORM is to be avoided?

    Perhaps something like https://github.com/sqlc-dev/sqlc ?

  • User authentication in go
    10 projects | dev.to | 30 Jan 2025
    Next, let's write sql queries for retrieving our users & their permissions. Here we will use sqlc for type-safe code generation from our sql queries, and pgx as its backend
  • Rails for Everything
    18 projects | news.ycombinator.com | 1 Jan 2025
  • Show HN: Generate type-safe code for SQL queries in any language
    2 projects | news.ycombinator.com | 27 Nov 2024
    sqlc (https://sqlc.dev/) is amazing, but I needed to use it in several unsupported languages. So instead of creating a plugin for each of those languages, I created a generic one, which is based on go templates.
  • Some Go web dev notes
    16 projects | news.ycombinator.com | 29 Sep 2024
    I really wanted to like sqlc, but it had some major limitations and minor annoyances last time I tried it a few months ago. You might want to go through its list of issues[1] before adopting it.

    Things like no support for dynamic queries[2], one-to-many relationships[3], embedded CTEs[4], composite types[5], etc.

    It might work fine if you only have simple needs, but if you ever want to do something slightly sophisticated, you'll have to fallback to the manual approach. It's partly understandable, though. It cannot realistically support every feature of every DBMS, and it's explicitly not an ORM. But I still decided to stick to the manual approach for everything, instead of wondering whether something is or isn't supported by sqlc.

    [1]: https://github.com/sqlc-dev/sqlc/issues/

    [2]: https://github.com/sqlc-dev/sqlc/issues/3414

    [3]: https://github.com/sqlc-dev/sqlc/issues/3394

    [4]: https://github.com/sqlc-dev/sqlc/issues/3128

    [5]: https://github.com/sqlc-dev/sqlc/issues/2760

  • Sqlc: Compile SQL to type-safe code
    15 projects | news.ycombinator.com | 8 Sep 2024
    I missed this too. However, I've found you can work around it pretty easily with clauses like CASE WHEN @field != "" THEN column = @field ELSE true END.

    Example from the sqlc creator (https://github.com/sqlc-dev/sqlc/discussions/364#discussionc...):

      -- name: FilterFoo :many
  • At 50 Years Old, Is SQL Becoming a Niche Skill?
    3 projects | news.ycombinator.com | 27 Jun 2024
    LOL...

    And then there is Golang. SQLC ( https://sqlc.dev ) becomes a source of truth not a sink... mix in some yaml and you have your json tags and validation mixed in.

    Candidly good engineers are still using SQL...

  • FrankenPHP: The Modern PHP App Server
    19 projects | news.ycombinator.com | 29 May 2024
    >> Also, I can think of a number of json schemas that are impossible to replicate in Go's type system but work just fine in PHP.

    Not at all. There are some that would be painful to write "by hand". An expansive and nested set of null fields would suck if I had to spell it all out...

    https://sqlc.dev << changes everything. If you add in the YAML (and I hate yaml) you can get your JSON to DB mapping in there, as well as your validations (all output as struct tags).

    Everything else that you're going to want (transforming inputs to/from json, logging, auth) is some pretty simple middleware.

  • A note from our sponsor - SaaSHub
    www.saashub.com | 24 May 2025
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic sqlc repo stats
182
15,064
9.0
2 days ago

sqlc-dev/sqlc is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of sqlc is Go.


Sponsored
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com

Did you know that Go is
the 4th most popular programming language
based on number of references?