Go SQL

Open-source Go projects categorized as SQL

Top 23 Go SQL Projects

  • tidb

    TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial

    Project mention: Show HN: GitHub Organization Analytics | news.ycombinator.com | 2023-10-25

    It's MySQL-Compatible database for scale and real-time analytics https://github.com/pingcap/tidb

  • cockroach

    CockroachDB - the open source, cloud-native distributed SQL database.

    Project mention: No More Free Tier on PlanetScale, Here Are Free Alternatives | dev.to | 2024-03-08

    CockroachDB - SQL

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

  • dolt

    Dolt – Git for Data

    Project mention: What I Talk About When I Talk About Query Optimizer (Part 1): IR Design | news.ycombinator.com | 2024-01-29

    We implemented a query optimizer with a flexible intermediate representation in pure Go:

    https://github.com/dolthub/go-mysql-server

    Getting the IR correct so that it's both easy to use and flexible enough to be useful is a really interesting design challenge. Our primary abstraction in the query plan is called a Node, and is way more general than the IR type described in the article from OP. This has probably hurt us: we only recently separated the responsibility to fetch rows into its own part of the runtime, out of the IR -- originally row fetching was coupled to the Node type directly.

    This is also the query engine that Dolt uses:

    https://github.com/dolthub/dolt

    But it has a plug-in architecture, so you can use the engine on any data source that implements a handful of Go interface.

  • rqlite

    The lightweight, distributed relational database built on SQLite.

    Project mention: The lightweight, easy-to-use, distributed relational database built on SQLite | news.ycombinator.com | 2024-02-23
  • go-sql-driver/mysql

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

    Project mention: Tools besides Go for a newbie | /r/golang | 2023-03-26

    IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here

  • migrate

    Database migrations. CLI and Golang library.

    Project mention: How to use SQLC with Golang | dev.to | 2024-01-03

    $ curl -L https://github.com/golang-migrate/migrate/releases/download/$version/migrate.$os-$arch.tar.gz | tar xvz

  • sqlc

    Generate type-safe code from SQL

    Project mention: Give Up Sooner | dev.to | 2024-03-13

    "Is there a way to get sqlc to use pointers for nullable columns instead of the sql.Null types?"

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

  • bytebase

    The GitLab/GitHub for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.

    Project mention: Resend – Incident report for February 21st, 2024 | news.ycombinator.com | 2024-02-23

    We have been working on bytebase (https://github.com/bytebase/bytebase) for 3+ years to address this. With a change review workflow, environment propagations, and try not to disturb the dev flow if possible.

  • go-clean-arch

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

  • usql

    Universal command-line interface for SQL databases

    Project mention: xo/usql: Universal command-line interface for SQL databases | /r/devel | 2023-06-08
  • immudb

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

    Project mention: Ask HN: What is your experience of tamper proof systems? | news.ycombinator.com | 2024-01-05
  • steampipe

    Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.

    Project mention: Show HN: Query Your Sheets with SheetSQL | news.ycombinator.com | 2024-03-13

    Readers may also enjoy Steampipe [1], an open source CLI to live query Google Sheets [2] and 140+ other services with SQL (e.g. AWS, GitHub, etc). It uses Postgres Foreign Data Wrappers under the hood and supports joins etc across the services. (Disclaimer - I'm a lead on the project.)

    1 - https://github.com/turbot/steampipe

  • go-sqlmock

    Sql mock driver for golang to test database interactions

    Project mention: How do you unit-test code that reaches out to the db, without introducing interfaces everywhere? | /r/golang | 2023-08-16
  • go-pg

    Golang ORM with focus on PostgreSQL features and performance

  • cloudquery

    The open source high performance data integration platform built for developers.

    Project mention: We might want to regularly keep track of how important each server is | news.ycombinator.com | 2024-02-06

    Check out CloudQuery - https://github.com/cloudquery/cloudquery for an easy cloud asset inventory.

  • goose

    A database migration tool. Supports SQL migrations and Go functions.

    Project mention: Recent improvements to the pressly/goose migration tool | /r/golang | 2023-11-14

    In v3.16.0 we added a new Provider feature that unlocks the ability to implement a lot of highly requested features. More details in the blog post:

  • 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: Wazero: Zero dependency WebAssembly runtime written in Go | news.ycombinator.com | 2023-07-01

    Never got it to anything close to a finished state, instead moving on to doing the same prototype in llvm and then cranelift.

    That said, here's some of the wazero-based code on a branch - https://github.com/cube2222/octosql/tree/wasm-experiment/was...

    It really is just a very very basic prototype.

  • xo

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

    Project mention: Open-sourcing SQX, a way to build flexible database models in Go | news.ycombinator.com | 2023-09-02

    i like xo's approach https://github.com/xo/xo but it is as is. I would love if something similar comes along that is used by db practititoners that is actively used and supported.

  • upper.io/db

    Data access layer for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.

  • dsq

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

    Project mention: Tracking SQLite Database Changes in Git | news.ycombinator.com | 2023-11-02

    You might want to look at tsv-utils, or a similar project: https://github.com/eBay/tsv-utils

    For the SQL part, but maybe a lot heavier, you can use one of the projects listed on this page: https://github.com/multiprocessio/dsq (No longer maintained, but has links to lots of other projects)

  • mergestat-lite

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

  • sql-migrate

    SQL schema migration tool for Go.

  • cloudnative-pg

    CloudNativePG is a Kubernetes operator that covers the full lifecycle of a PostgreSQL database cluster with a primary/standby architecture, using native streaming replication

    Project mention: Homelab: Running Postgres on Kubernetes | news.ycombinator.com | 2024-01-02

    My holiday project was doing another pass at my Homelab Kubernetes cluster, part of which involved switching to a proper operator to manage Postgres. Coincidentally, I setup cloudnative-pg (https://github.com/cloudnative-pg/cloudnative-pg) yesterday.

  • SaaSHub

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

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). The latest post mention was on 2024-03-13.

Go SQL related posts

Index

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

Project Stars
1 tidb 35,879
2 cockroach 28,797
3 dolt 16,610
4 rqlite 14,703
5 go-sql-driver/mysql 14,061
6 migrate 13,672
7 sqlc 10,445
8 bytebase 9,722
9 go-clean-arch 8,562
10 usql 8,529
11 immudb 8,450
12 steampipe 6,309
13 go-sqlmock 5,759
14 go-pg 5,553
15 cloudquery 5,505
16 goose 5,357
17 octosql 4,675
18 xo 3,536
19 upper.io/db 3,463
20 dsq 3,462
21 mergestat-lite 3,406
22 sql-migrate 3,063
23 cloudnative-pg 3,039
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com