Search across all documentation pages
10 pages in this section.
Learn how Go's database/sql package provides a driver-agnostic foundation for database access, connection pooling, and transactions.
Learn Go database basics with 10 examples using database/sql. Explore sql.Open, ExecContext, QueryContext, rows.Scan, and connection handling.
Tune Go's database/sql connection pool with SetMaxOpenConns, SetMaxIdleConns, and SetConnMaxLifetime to prevent database starvation.
Learn how to use sql.Tx in Go to group database operations into atomic transactions and reuse prepared statements for efficiency.
Learn to manage database schema changes with golang-migrate and goose. Apply SQL or Go migrations, handle rollbacks, and integrate into CI/CD pipelines.
Embed SQL migration files and seed scripts in Go binaries using embed.FS. Learn to deploy self-contained artifacts for databases.
Optimize database access with best practices for Go applications. Learn about connection pooling, context deadlines, query timeouts, and observability.
A single-page roundup of every highlight bullet from the 9 pages in the Databases section, grouped by source page so you can scan all 52 takeaways without opening each article individually.