Back to basics: Writing an application using Go and PostgreSQL with pgx

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • SaaSHub - Software Alternatives and Reviews
  • pgx

    PostgreSQL driver and toolkit for Go

    By reading this tutorial, you'll learn how to use PostgreSQL with the Go programming language using the pgx driver and toolkit in a very productive manner. Furthermore, with the provided source code, you'll be able to learn how to write efficient and sound unit and integration tests, ready to be run locally or on a Continuous Integration environment, such as GitHub Actions. Use the Table of Contents to skip to a specific part of this long post. Don't forget to check out the accompanying repository github.com/henvic/pgxtutorial.

  • PostgreSQL

    Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch

    By reading this tutorial, you'll learn how to use PostgreSQL with the Go programming language using the pgx driver and toolkit in a very productive manner. Furthermore, with the provided source code, you'll be able to learn how to write efficient and sound unit and integration tests, ready to be run locally or on a Continuous Integration environment, such as GitHub Actions. Use the Table of Contents to skip to a specific part of this long post. Don't forget to check out the accompanying repository github.com/henvic/pgxtutorial.

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • pgxtutorial

    # Clone my repository with any of the following commands: $ gh repo clone henvic/pgxtutorial $ git clone https://github.com/henvic/pgxtutorial.git $ git clone [email protected]:henvic/pgxtutorial.git # then: $ cd pgxtutorial # Create a database $ psql -c "CREATE DATABASE pgxtutorial;" # Set the environment variable PGDATABASE $ export PGDATABASE=pgxtutorial # Run migrations $ tern migrate -m ./migrations # Run all tests passing INTEGRATION_TESTDB explicitly $ INTEGRATION_TESTDB=true go test -v ./... # Execute application $ go run ./cmd/pgxtutorial 2021/11/22 07:21:21 HTTP server listening at localhost:8080 2021/11/22 07:21:21 gRPC server listening at 127.0.0.1:8082

  • ApacheKafka

    A curated re-sources list for awesome Apache Kafka

    It works similar to hooking Apache Kafka, but is easier to use and allows us to move faster without breaking things: running integration tests on a developer machine takes only seconds: much of which is an overkill time.Sleep() so we never waste time with flaky tests caused by the eventual consistency characteristics of the search engine. This solution will not be presented now but in a future opportunity.

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