Episode 13
We briefly describe how to use the database/sql
package and show example code on how to do CRUD actions against a SQL databases using the flexible database/sql
package.
The screencast includes example code to show best practices in reading, writing and updating data to the database. Note that if the standard library documentation is lacking for you, http://go-database-sql.org/ is another wonderful source of documentation.
Note: the examples in this screencast operate against an in-memory SQLite database, but we point out the line of code to change to operate against any other supported database.
Check out the example code on GitHub and keep on rockin', Gophers!