shredbx logo
shredbx shredbx shredbx shredbx Personal
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
AClaude
  • Home
  • Lab
  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
Andrei Solovev
Packages
Search packages... ⌘K
  • Data & Persistence
    • Databases 3
    • Object Storage 1
    • File Formats 2
    • Enumerations 2
    • Content 1
    • Codegen 2
  • System Integration
    • Secrets 1
    • CLI Tools 5
    • Media Processing 2
    • Adapters 2
  • UI & Components
    • Primitives 1
    • Blocks 1
    • Sections & Layouts 1
    • Entities 1
    • Media 1
    • Utilities 1
    • State & Presenter 1
    • Branding & Style 1
  • Game Engine
    • Framework 1
    • Engine 2
    • Presets 1
    • Vendor 1
Packages/ Data & Persistence/ Databases/ Database
Go Package

database

PostgreSQL adapter — connection pooling, schema isolation, health checks

Go Ready MD
Connection Pool Lifecycle
$ pool, err := database.NewPool(ctx, cfg)
[database] connecting to postgres://sbx@localhost:5432/sbx
[database] schema: sbx_dev
[database] pool: min=2 max=10 idle_timeout=5m
[database] pool ready — 2 connections established
$ err = pool.HealthCheck(ctx)
[health] acquired=1 idle=2 total=3 max=10
[health] ok — 0.4ms

About

Provides a managed PostgreSQL connection pool built on pgx/pgxpool. Handles schema-qualified connections for multi-tenant isolation, automatic health monitoring, and graceful shutdown with drain support.

Public API

NameKindSignature
NewPoolfuncfunc NewPool(ctx context.Context, cfg Config) (*Pool, error)
Pooltypetype Pool struct
Configtypetype Config struct
HealthCheckfuncfunc (p *Pool) HealthCheck(ctx context.Context) error

Dependencies

Imports (2)

config Go Ready

YAML configuration reader — typed config loading with environment overlay

yamlconfigurationenvironmenttyped-config
4 exports 4 deps
vault Go Ready

1Password vault adapter — credential retrieval, caching, op:// URI resolution

1passwordsecretscredentialsop-uri
5 exports 4 deps

Imported By (3)

persistence Go Ready

Generic persistence layer — CRUD operations with type-safe repositories

crudgenericsrepository-patterntype-safe
4 exports 2 deps
repository Go Ready

Domain-specific repositories — typed wrappers for entity persistence

domain-driventyped-repositoriesentity-storage
4 exports 2 deps
migrate Go Ready

Database migration runner — up/down/status with versioned SQL files

migrationssqlversionedup-down
5 exports 2 deps

Related Packages

persistence Go Ready

Generic persistence layer — CRUD operations with type-safe repositories

crudgenericsrepository-patterntype-safe
4 exports 2 deps
repository Go Ready

Domain-specific repositories — typed wrappers for entity persistence

domain-driventyped-repositoriesentity-storage
4 exports 2 deps
migrate Go Ready

Database migration runner — up/down/status with versioned SQL files

migrationssqlversionedup-down
5 exports 2 deps

Source

github.com/shredbx/sbx-core/pkg/database
postgresqlpgxpoolingschema-isolation
shredbx logo shredbx shredbx shredbx shredbx Andrei Solovev

Solution Architect & Lead Software Engineer

ExperiencePortfolioResearch & ExperimentsEducationCertificationSkills
GitHub ↗LinkedIn ↗Email ↗
AVAILABLE FOR NEW PROJECTS
// MY LATEST BEATS
Hobby & Interests

Lab

  • The Lab
  • Framework
  • Components
  • Packages
  • Games
  • Process (SDLC)
  • Knowledge
  • Blog

Andrei

  • Portfolio
  • Experience
  • Services
  • Profile
  • Contact
  • Lifestyle

Team

  • Team
  • Andrei
  • Claude

Legal

  • Privacy
  • Terms
  • Cookies
© 2026 shredbx.com. All rights reserved. — Andrei Solovev |