We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
In my years working with Golang, I came to the conclusion that working with SQL is not a well-solved problem yet. The libraries that we have available are just not easy to use and there are too many ways of shooting your own foot.
To illustrate that I will try to describe in this article all these problems in detail and then briefly present the solution that I came up with for solving these issues: a library that I wrote called
KSQL
.In the next sections we'll discuss three widely adopted libraries in the Golang ecosystem:
- The standard library:
database/sql
- A wrapper of the standard library that adds some cool features like struct scan:
sqlx
- A specialized driver for Postgres that is faster than the alternatives and that can be used together with
database/sql
orsqlx
:pgx
continue reading on betterprogramming.pub
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.