[Question] Suggested way to update a database row using gRPC/PostgreSQL (pgx) ?

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • flipt

    Enterprise-ready, GitOps enabled, CloudNative feature management solution

  • If you want to look at some example code, I do this same thing in my project Flipt which uses GRPC, Postgres (and optionally MySQL and Sqlite).

  • go-grpc-middleware

    Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.

  • I do some basic validation at the server layer using a GRPC interceptor.

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

    PostgreSQL driver and toolkit for Go

  • String manipulation could lead to nasty SQL injections and really because you're using pgx there's no need to do that either, see the Conn.SendBatch method, it should allow you to achieve what you're trying to do: execute multiple queries in a transaction and still get their results. (test example)

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