[HELP] Testing SQL queries and functions that use SQL queries in Golang.

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

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. dockertest

    Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.

    I don't know if you're familiar with Docker, but there's a package called ory/dockertest that allows you to run a container per suite (or per test it's up to you), that way you can actually test the code against a real local running database.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. social

    social network in GRPC, Go, mysql, and vuejs, (by imran31415)

  4. go-sqlmock

    Sql mock driver for golang to test database interactions

    For testing DB queries I use https://github.com/DATA-DOG/go-sqlmock for unit tests. I then have a separate integration test suite that runs against all our services using Docker.

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

  • Princípios SOLID em GoLang - Dependency Inversion Principle (DIP)

    1 project | dev.to | 3 Aug 2024
  • How do you unit-test code that reaches out to the db, without introducing interfaces everywhere?

    1 project | /r/golang | 16 Aug 2023
  • Integration Tests with Postgres

    2 projects | /r/golang | 29 Mar 2023
  • When to mock and what to mock in a Web API?

    3 projects | /r/golang | 23 Mar 2023
  • Can you set expectations for SQL transaction using Testify?

    2 projects | /r/golang | 17 Jul 2022

Did you know that Go is
the 4th most popular programming language
based on number of references?