golang-database-patterns
Go Database Patterns
Overview
Go's database ecosystem provides multiple layers of abstraction for SQL database integration. From the standard library's database/sql to enhanced libraries like sqlx and PostgreSQL-optimized pgx, developers can choose the right tool for their performance and ergonomics needs.
Key Features:
- π database/sql: Standard interface for any SQL database
- π sqlx: Convenience methods with struct scanning and named queries
- π pgx: PostgreSQL-native driver with maximum performance
- π¦ Repository Pattern: Interface-based data access for testability
- π Migrations: Schema versioning with golang-migrate
- β‘ Connection Pooling: Production-ready connection management
- π Transaction Safety: Context-aware transaction handling
When to Use This Skill
Activate this skill when:
- Building CRUD operations with type safety
More from bobmatnyc/claude-mpm-skills
drizzle-orm
Type-safe SQL ORM for TypeScript with zero runtime overhead
4.3Kplaywright-e2e-testing
Playwright modern end-to-end testing framework with cross-browser automation, auto-wait, and built-in test runner
2.7Kpydantic
Python data validation using type hints and runtime type checking with Pydantic v2's Rust-powered core for high-performance validation in FastAPI, Django, and configuration management.
2.2Ktailwind-css
Tailwind CSS utility-first framework for rapid UI development with responsive design and dark mode
1.2Ktrpc-type-safety
tRPC end-to-end type-safe APIs for TypeScript with React Query integration and full-stack type safety
1.1Kpytest
pytest - Python's most powerful testing framework with fixtures, parametrization, plugins, and framework integration for FastAPI, Django, Flask
899