Creating an API using Go and sqlc

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • LearnThisRepo.com - Learn 300+ open source libraries for free using AI.
  • WorkOS - The modern API for authentication & user identity.
  • Squirrel

    Fluent SQL generation for golang

    use some lib that facilitates SQL generation, like Squirrel

  • post-sqlc

    Code used in a post about sqlc.dev

    db.go - contains the interfaces, structs, and constructors

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

  • go-sqlmock

    Sql mock driver for golang to test database interactions

    For that, I used the lib go-sqlmock. So, for example, the following snippet is part of the person/service_test.go file:

  • sqlc

    Generate type-safe code from SQL

    I will present in this post a project that fits in the last category: sqlc.

  • sqlx

    general purpose extensions to golang's database/sql

    Implement the Repository interface by writing the queries in code, perhaps using some solution like Squirrel or sqlx.

  • LearnThisRepo.com

    Learn 300+ open source libraries for free using AI. LearnThisRepo lets you learn 300+ open source repos including Postgres, Langchain, VS Code, and more by chatting with them using AI!

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