Learn How To Connect Golang to Databases with Database/SQL

Posted by Baron Schwartz on Jul 1, 2019 1:44:10 PM

We've just released a brand-new end-to-end update of our most popular ebook, the Ultimate Guide to Building Database-Intensive Apps with Go. This book has been downloaded thousands of times every year since we first released it, and now we've completely revised and refreshed it.

golang-book-2019 copy

If you build applications in Go, and those apps talk to relational databases, this book is for you. It'll help you learn how to use database/sql like those who've been doing it for years and years, because it's written by those who fit that description. Database/sql is lightweight and beautifully designed, but like a lot of Go, the design doesn't "click" until you have accrued some experience—and once it does, it's hard to understand and explain why you were ever confused in the first place.

This book tries to bridge that gap, and based on the historical downloads it's gotten, it does a great job at that. It doesn't teach you the obvious stuff, as much as it outlines the basics and then uses all the common little misunderstandings to clarify and sharpen your understanding of those basics.

The 2019 edition is newer, bigger, and better in the following main ways: instrumentation, tracing, observability and monitoring, contexts, transactions, configuration, stored procedures, multiple result sets, inspecting column types and the like, and ensuring that a set of statements is all issued on a single connection to the database. Whew!

Oh, and a couple of non-content-related improvements: a) the typography and layout is better and b) the cover has incredibly cute gophers drawn by the one and only Ashley McNamara (thanks Ashley!)

One thing that hasn't changed: it's still free. To get your copy, head to the download page and fill out the form!

Recent Posts

Posts by Topic

see all