Which SQL driver to use with Postgres

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

Our great sponsors
  • InfluxDB - Access the most powerful time series database as a service
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
  • pq

    Pure Go Postgres driver for database/sql

    For convenience, it is better to use https://github.com/lib/pq in conjunction with https://github.com/jmoiron/sqlx, you will have all the data in json

  • go-sql-driver/mysql

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

    I'm following Alex Edwards web dev book, he uses MySQL with go-sql-driver/mysql , i want to use Postgres, which one should I use?

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • pgx

    PostgreSQL driver and toolkit for Go

  • sqlc

    Generate type-safe code from SQL

    I can recommend pairing it with sqlc: https://github.com/kyleconroy/sqlc

  • sqlx

    general purpose extensions to golang's database/sql

    For convenience, it is better to use https://github.com/lib/pq in conjunction with https://github.com/jmoiron/sqlx, you will have all the data in json

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

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