© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro Gohttps://doi.org/10.1007/978-1-4842-7355-5_26

26. Working with Databases

Adam Freeman1  
(1)
London, UK
 

In this chapter, I describe the Go standard library for working with SQL databases. These features provide an abstract representation of the capabilities offered by a database and rely on driver packages to deal with the implementation of a specific database.

There are drivers for a wide range of databases, and a list can be found at https://github.com/golang/go/wiki/sqldrivers. Database drivers are distributed as Go packages, and most databases have multiple driver packages. Some driver packages rely on cgo, which allows Go code to use C libraries, ...

Get Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.