Go SQL

Open-source Go projects categorized as SQL

Top 23 Go SQL Projects

  1. tidb

    TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.

    Project mention: RocksDB: Your Key-Value Store Powerhouse (and Why You Should Care) | dev.to | 2025-02-16

    TiDB: https://pingcap.com/

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

    CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.

    Project mention: Cloud-Native Architectures: Building Resilient Systems | dev.to | 2025-04-28

    Employ distributed databases like CockroachDB, Cassandra, or managed services like Amazon Aurora Global Databases.

  4. dolt

    Dolt – Git for Data

    Project mention: Dolt as a backing database for blockchains | dev.to | 2025-03-24

    Before Dolt appeared on my radar, I thought this problem was non-trivial, and very difficult to implement: Whenever a fork occurs, or blocks arrive at your node that conflict with your current chain, you have to validate these new blocks against a snapshot of your data at a specific point in time. This point in time is determined by the parent block hash of the incoming blocks. This requirement for "time-travel" has always deterred me from attempting my own blockchain implementation. I know that there are blockchains out there that have (maybe?) solved this, but I'm not as good as a programmer as those guys. If you're anything like me, maybe you can relate.

  5. migrate

    Database migrations. CLI and Golang library.

    Project mention: Mastering Database Migrations in Go with golang-migrate and SQLite | dev.to | 2025-04-14

    Managing database changes is critical for any software project. This guide walks you through using golang-migrate with SQLite in Go to handle migrations cleanly and consistently.

  6. rqlite

    The lightweight, user-friendly, distributed relational database built on SQLite.

    Project mention: Litestream: Revamped | news.ycombinator.com | 2025-05-20

    I have been following Ben for a long time but I never knew LiteFS was based on his work. I somehow settled eventually for rqlite for self managed distributed.

    https://github.com/rqlite/rqlite

  7. sqlc

    Generate type-safe code from SQL

    Project mention: Sqlc: Generate type-safe code from SQL | news.ycombinator.com | 2025-04-16
  8. go-sql-driver/mysql

    Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package (by go-sql-driver)

    Project mention: HTMX + Go : Build a CRUD App with Golang and HTMX | dev.to | 2024-07-15

    Next, we need to install some dependencies. We already know we are using MySQL as our database, thus, we need to install the MySQL driver for Golang.

  9. SaaSHub

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

    SaaSHub logo
  10. go-clean-arch

    Go (Golang) Clean Architecture based on Reading Uncle Bob's Clean Architecture

    Project mention: GO — Estrutura de projetos | dev.to | 2024-06-18

    https://dev.to/booscaaa/implementando-clean-architecture-com-golang-4n0a https://github.com/golang-standards/project-layout https://blog.boot.dev/golang/golang-project-structure/ https://github.com/bnkamalesh/goapp https://www.wolfe.id.au/2020/03/10/how-do-i-structure-my-go-project/ https://blog.logrocket.com/flat-structure-vs-layered-architecture-structuring-your-go-app/ https://developer20.com/how-to-structure-go-code/ https://dev.to/jinxankit/go-project-structure-and-guidelines-4ccm https://github.com/bxcodec/go-clean-arch https://golangexample.com/example-go-clean-architecture-folder-pattern/ https://www.calhoun.io/flat-application-structure/ https://go.dev/doc/effective_go#names https://go.dev/blog/package-names

  11. usql

    Universal command-line interface for SQL databases

    Project mention: Why is database support in every language bad? | news.ycombinator.com | 2025-03-02

    frameworks / ORM are just specilized database graphical user interface front ends designed to simplify how data is displayed/inputed

    Database management systems usually provide a way of importing/exporting 'raw' data via sql statement(s) results. aka cvs, comma delimited, html formatted, json formatted, etc. aka do command line sql query with 'html formatted output' and open results of file in a brower.

    postgres psql provides an interactive 'cli' environment; windows sql server - sqlcmd;

    usql[1] provides something similar to psql for no-sql databases.

    sqlc is sorta the equivalent of combining the command line shell & sql queries. SQLx rust is rust extention for handling 'sql from command line, just via rust language, instead of going through command line shell.'

    ----

    [1] : https://github.com/xo/usql

  12. immudb

    immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history

    Project mention: ImmuDB: Merging Blockchain Data Integrity with Innovative Open Source Funding | dev.to | 2025-05-12

    For more technical deep-dives into blockchain-based open source funding or to explore how these principles apply across technology sectors, visit ImmuDB's official site and browse related resources such as Open Source Developer Support Programs for guidance.

  13. goose

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

    Project mention: How to handle migrations in Golang | dev.to | 2024-06-11

    goose

  14. go-sqlmock

    Sql mock driver for golang to test database interactions

    Project mention: Princípios SOLID em GoLang - Dependency Inversion Principle (DIP) | dev.to | 2024-08-03
  15. cloudquery

    The developer first cloud governance platform

  16. cloudnative-pg

    CloudNativePG is a comprehensive platform designed to seamlessly manage PostgreSQL databases within Kubernetes environments, covering the entire operational lifecycle from initial deployment to ongoing maintenance

    Project mention: Xata: Postgres at scale, with copy-on-write branching and anonymization | news.ycombinator.com | 2025-05-17

    > we deploy the Postgres instances on Kubernetes via the CloudNativePG operator.

    I'm curious if split brain cases already happeened. At scale, it should be so https://github.com/cloudnative-pg/cloudnative-pg/issues/7407

  17. go-pg

    Golang ORM with focus on PostgreSQL features and performance

  18. octosql

    OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.

    Project mention: Feldera Incremental Compute Engine | news.ycombinator.com | 2024-09-29
  19. bun

    SQL-first Golang ORM (by uptrace)

  20. xo

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

    Project mention: Sqlc: Compile SQL to type-safe code | news.ycombinator.com | 2024-09-08

    XO doesn’t have them built-in, but it uses easily customizable templates.

    I added support for a bunch of postgres fancy stuff in a previous app, it wasn’t too difficult

    https://github.com/xo/xo

  21. dsq

    Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more.

  22. upper.io/db

    Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

  23. mergestat-lite

    Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊

    Project mention: Show HN: "Git who" – A new CLI tool for industrial-scale Git blaming | news.ycombinator.com | 2025-03-18

    This is such a cool tool. It's a better approach to solving many of the questions I built MergeStat to answer (https://github.com/mergestat/mergestat-lite). It's been some time, but I also wrote a `git blame ...` parser in Go: https://github.com/mergestat/gitutils/blob/main/blame/blame.... :)

    Amazing work and excited to dig into this more thoroughly

  24. sql-migrate

    SQL schema migration tool for Go.

  25. jet

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

    Project mention: Some Go web dev notes | news.ycombinator.com | 2024-09-29

    It gets mentioned a lot in the context of database/sql and sqlc alternatives, but Jet has been a great alternative so far, most notably because of its non-issue with dynamic queries support.

    https://github.com/go-jet/jet/

  26. SaaSHub

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

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go SQL discussion

Log in or Post with

Go SQL related posts

  • Stoolap: High-performance, SQL database in pure Go with zero dependencies

    2 projects | news.ycombinator.com | 21 May 2025
  • Ask HN: What's your go-to message queue in 2025?

    6 projects | news.ycombinator.com | 17 May 2025
  • Show HN: TextQuery – Query CSV, JSON, XLSX Files with SQL

    4 projects | news.ycombinator.com | 5 May 2025
  • Cloud-Native Architectures: Building Resilient Systems

    2 projects | dev.to | 28 Apr 2025
  • Sqlc: Generate type-safe code from SQL

    1 project | news.ycombinator.com | 16 Apr 2025
  • Go channels are bad and you should feel bad (2016)

    2 projects | news.ycombinator.com | 13 Apr 2025
  • Dolt as a backing database for blockchains

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

Index

What are some of the best open-source SQL projects in Go? This list will help you:

# Project Stars
1 tidb 38,473
2 cockroach 30,895
3 dolt 18,676
4 migrate 16,672
5 rqlite 16,609
6 sqlc 15,023
7 go-sql-driver/mysql 14,799
8 go-clean-arch 9,520
9 usql 9,365
10 immudb 8,742
11 goose 8,392
12 go-sqlmock 6,354
13 cloudquery 6,092
14 cloudnative-pg 5,973
15 go-pg 5,716
16 octosql 5,036
17 bun 4,163
18 xo 3,817
19 dsq 3,792
20 upper.io/db 3,595
21 mergestat-lite 3,500
22 sql-migrate 3,330
23 jet 3,179

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?