[Question] Working with databases/storing data in Go applications.

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SonarQube - Static code analysis for 29 languages.
  • Mergify - Updating dependencies is time-consuming.
  • reform

    A better ORM for Go, based on non-empty interfaces and code generation. (by go-reform)

    However, you can use something like this https://github.com/go-reform/reform to help you with, I will call it automating the code writing. But I have always opted to one of the supported drivers and written a queries myself using for example this https://github.com/go-sql-driver/mysql.

  • go-sql-driver/mysql

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

    However, you can use something like this https://github.com/go-reform/reform to help you with, I will call it automating the code writing. But I have always opted to one of the supported drivers and written a queries myself using for example this https://github.com/go-sql-driver/mysql.

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • sqlx

    general purpose extensions to golang's database/sql

    There's nothing particularly difficult or unusual. I run a small commercial website that has Go hitting a PostgreSQL db. I like https://github.com/jmoiron/sqlx to make the db queries. Yes, you have to know SQL, but that's a feature not a bug. It helps to know *how* and *why* things work. IMHO magic solutions like ORMs will eventually bite you.

  • Squirrel

    Fluent SQL generation for golang

    I prefer pure SQL for ORMs, but string manipulation is a lot of boilerplate. SQL generation https://github.com/Masterminds/squirrel + sqlx + database driver (e.g. pgx) works best for my tasks.

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