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

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

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • 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.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • 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