Decent examples querying models from Postgres

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

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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • sqlx

    general purpose extensions to golang's database/sql

  • Yes, the rows/scanning pattern is pretty verbose and gets annoying fast, which is why there are a lot of packages to help simplify this. The most popular is sqlx

  • scan

    Scan provides the ability to to scan sql rows directly to any defined structure. (by stephenafamo)

  • Personally, I created a scanning package specifically for this based on generics and even more flexibility, still needs a bit more documentation, but check it out Scan.

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

    InfluxDB logo
  • jet

    Type safe SQL builder with code generation and automatic query result data mapping

  • sqlc

    Generate type-safe code from SQL

  • For me sqlc work wonders. If you are developing a user facing api and are fine to go with graphql, with gqlgen you can even autobind (search the page for @goModel) the models that sqlc generates from your queries. A glorious match

  • gqlgen

    go generate based graphql server library

  • For me sqlc work wonders. If you are developing a user facing api and are fine to go with graphql, with gqlgen you can even autobind (search the page for @goModel) the models that sqlc generates from your queries. A glorious match

  • SQLBoiler

    Generate a Go ORM tailored to your database schema.

  • Take a look at sqlboiler. It's an ORM that generates the database models for you based on the SQL schema.

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

  • Comparing database/sql, GORM, sqlx, and sqlc

    4 projects | /r/golang | 27 Apr 2023
  • Any mid sized / big open source code base in golang that makes use of SQL DBs?

    4 projects | /r/golang | 18 Feb 2023
  • ORMs are nice but they are the wrong abstraction

    7 projects | news.ycombinator.com | 1 Feb 2024
  • Go ORMs Compared

    5 projects | dev.to | 18 Jan 2024
  • denodb VS denodata - a user suggested alternative

    2 projects | 29 Nov 2023