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 free: https://tidbcloud.com/free-trial

    Project mention: Banco de dados puramente com go | reddit.com/r/brdev | 2022-11-08

    Pesquise por CockroachDB ou TiDB

  • cockroach

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

    Project mention: How do I implement a HA PostgreSQL setup in k8s/k3s ? | reddit.com/r/kubernetes | 2022-11-23

    Technically not postgres, but could be worth checking out cockroach db, it can use any postgres driver from programming languages and is build for distribution. I recently moved from postgres to cockroach (with golang postgres driver) and didnt need to change a single query

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Data Platform where developers build real-time applications for analytics, IoT and cloud-native services in less time with less code.

  • dolt

    Dolt – Git for Data

    Project mention: You've heard of big data, now get ready for cozy data | reddit.com/r/DataHoarder | 2022-11-18
  • go-sql-driver/mysql

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

    Project mention: Question about inserting date into MySQL? | reddit.com/r/golang | 2022-11-15

    If you are using https://github.com/go-sql-driver/mysql you need to add parseTime=true to the DSN to be able to use time.Time.

  • rqlite

    The lightweight, distributed relational database built on SQLite

    Project mention: Crsql – Multi-writer and CRDT support for SQLite | news.ycombinator.com | 2022-11-14
  • migrate

    Database migrations. CLI and Golang library.

    Project mention: Libraries you use most of your projects? | reddit.com/r/golang | 2022-11-02

    There are other things I generally drag around out of habit like migrate, but I don't necessarily love those as much.

  • immudb

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

    Project mention: AWS and Blockchain | news.ycombinator.com | 2022-11-20
  • SonarLint

    Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.

  • usql

    Universal command-line interface for SQL databases

    Project mention: Is there a CLI interface to browse SQL databases? | reddit.com/r/commandline | 2022-08-10

    take a look at: https://github.com/xo/usql

  • go-clean-arch

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

    Project mention: Best practices for structuring Go HTTP applications | reddit.com/r/golang | 2022-10-25
  • sqlc

    Generate type-safe code from SQL

    Project mention: ORMs | reddit.com/r/golang | 2022-11-14

    sqlc

  • go-pg

    Golang ORM with focus on PostgreSQL features and performance

    Project mention: What SQL library are you using? | reddit.com/r/golang | 2022-07-02

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

  • go-sqlmock

    Sql mock driver for golang to test database interactions

    Project mention: Creating an API using Go and sqlc | dev.to | 2022-10-24

    For that, I used the lib go-sqlmock. So, for example, the following snippet is part of the person/service_test.go file:

  • bytebase

    Database CI/CD for DevOps teams. https://www.bytebase.com

    Project mention: Upgrade a 1TB PostgreSQL DB In | news.ycombinator.com | 2022-10-14

    You can check out https://github.com/bytebase/bytebase. It provides a GUI for managing schema and data changes for Postgres, MySQL, Snowflake, ClickHouse, TiDB.

    Disclaimer: I am one of the authors.

  • 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: Steampipe – Select * from Cloud; | news.ycombinator.com | 2022-09-30

    To add somewhat of a counterpoint to the other response, I've tried the Steampipe CSV plugin and got 50x slower performance vs OctoSQL[0], which is itself 5x slower than something like DataFusion[1]. The CSV plugin doesn't contact any external API's so it should be a good benchmark of the plugin architecture, though it might just not be optimized yet.

    That said, I don't imagine this ever being a bottleneck for the main use case of Steampipe - in that case I think the APIs themselves will always be the limiting part. But it does - potentially - speak to what you can expect if you'd like to extend your usage of Steampipe to more than just DevOps data.

    [0]: https://github.com/cube2222/octosql

    [1]: https://github.com/apache/arrow-datafusion

    Disclaimer: author of OctoSQL

  • steampipe

    Use SQL to instantly query your cloud services (AWS, Azure, GCP and more). Open source CLI. No DB required.

    Project mention: List all resources by ARN in Service in AWS CLI | reddit.com/r/aws | 2022-11-30

    go look at steampipe.io

  • 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: Help with XO's new templating, how to access fields and params | reddit.com/r/golang | 2022-08-23

    I am using the library xo to generate basic data retrieval code from a sql schema for a crud api.

  • upper.io/db

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

    Project mention: [Hiring] Remote Golang job: Senior Backend Engineer (Go) at Horizon (Toronto, Canada) | reddit.com/r/jobbit | 2022-05-28

    You will be joining the expert Go team at Horizon, previously who in our spare time + for fun, authored OSS projects like chi (https://github.com/go-chi/chi), upper/db (https://github.com/upper/db), webrpc (https://github.com/webrpc/webrpc), goware (https://github.com/goware), and much more. Our Go codebases are extremely clean and the patterns we've built have been shaped over 7 years of writing production Go systems and open source projects. These are the patterns which we apply to our infrastructure at Horizon in our products Skyweaver and Sequence.

  • mergestat-lite

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

    Project mention: SQLite Doesn't Use Git | reddit.com/r/programming | 2022-09-12

    You can query git with this: https://github.com/mergestat/mergestat if you like the idea.

  • goose

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

    Project mention: DB schema management strategy (migrations) | reddit.com/r/golang | 2022-10-25

    Try: github.com/pressly/goose

  • dsq

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

    Project mention: Command-line data analytics made easy | news.ycombinator.com | 2022-11-03

    SPyQL is really cool and its design is very smart, with it being able to leverage normal Python functions!

    As far as similar tools go, I recommend taking a look at DataFusion[0], dsq[1], and OctoSQL[2].

    DataFusion is a very (very very) fast command-line SQL engine but with limited support for data formats.

    dsq is based on SQLite which means it has to load data into SQLite first, but then gives you the whole breath of SQLite, it also supports many data formats, but is slower at the same time.

    OctoSQL is faster, extensible through plugins, and supports incremental query execution, so you can i.e. calculate a running group by + count while tailing a log file. It also supports normal databases, not just file formats, so you can i.e. join with a Postgres table.

    [0]: https://github.com/apache/arrow-datafusion

    [1]: https://github.com/multiprocessio/dsq

    [2]: https://github.com/cube2222/octosql

    Disclaimer: Author of OctoSQL

  • sql-migrate

    SQL schema migration tool for Go.

    Project mention: How to use sql-migrate in Kubernetes? | reddit.com/r/golang | 2022-11-27
  • cloudquery

    The open-source data integration platform for security and infrastructure teams

    Project mention: Sync all your cloud asses to Snowflake and build an "Infrastructure Lake" | reddit.com/r/devops | 2022-11-25

    Hey! Im the founder of https://github.com/cloudquery/cloudquery we are an open source high performance data integration platform focused on cloud infrastructure. We just released a new integration to Snowflake which can be super useful if you already use it and/or if you want historical data of your cloud infra and query it later.

  • graphjin

    GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.

    Project mention: [Question] What will it take to create an automated graphQL API with Elixir? | reddit.com/r/elixir | 2022-10-29

    There are tools like Hasura/Haskell, Postgraphile/Node.js or Graphjin/Golang that could generate an automatic graphQL API from a Postgres database. Im new to Elixir and really love it. I wonder if there is anything similar these. I heard about Absinthe for graphQL, however as far as I understand it requires to write your own resolvers. What will it take to create a similar tool in Elixir like the one stated above? How would one go about it?

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

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 2022-11-30.

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 32,889
2 cockroach 26,154
3 dolt 13,540
4 go-sql-driver/mysql 12,851
5 rqlite 12,537
6 migrate 10,261
7 immudb 7,982
8 usql 7,668
9 go-clean-arch 6,855
10 sqlc 6,780
11 go-pg 5,271
12 go-sqlmock 4,842
13 bytebase 4,339
14 octosql 4,192
15 steampipe 4,107
16 xo 3,270
17 upper.io/db 3,221
18 mergestat-lite 3,207
19 goose 3,156
20 dsq 2,880
21 sql-migrate 2,642
22 cloudquery 2,555
23 graphjin 2,412
Close all those tabs. Zigi will handle your updates.
Zigi monitors Jira and GitHub updates, pings you when PRs need approval and lets you take fast actions - all directly from Slack! Plus it reduces cycle time by up to 75%.
www.zigi.ai