Documentation

Database Adapters

Use pgx, MySQL, and SQLite adapters with common interfaces.

Overview

Adapter interfaces let teams switch storage with minimal API-layer impact.

Example

Go

db, err := adapters.Open("pgx", dsn)
if err != nil {
  return err
}

Best Practices

  • Centralize connection lifecycle management.
  • Tune pool settings per environment.

Common Pitfalls

  • Using default pool sizes in production.
  • Skipping context timeouts in DB operations.