gorm-dbresolver
CommunitySeamlessly enable read/write splitting across DB replicas
Authorliurida
Version1.0.0
Installs0
System Documentation
What problem does it solve?
GORM applications that need to scale with multiple databases often struggle to manually manage read/write routing, connection switching, and load balancing, leading to complex and error‑prone code.
Core Features & Use Cases
- Automatic routing: Writes automatically go to source databases while reads are distributed among replicas.
- Manual overrides: Developers can force reads or writes on specific connections using provided clauses.
- Transaction consistency: All operations within a transaction use the same connection, preventing accidental switching.
- Multiple resolver configurations: Different models or tables can be assigned to distinct resolver groups for sharding or domain separation.
- Custom load‑balancing policies: Plug in custom algorithms like round‑robin or weighted distribution for replica selection.
Quick Start
Configure GORM with the dbresolver plugin to route writes to the primary database and reads to replica databases.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: gorm-dbresolver Download link: https://github.com/liurida/gorm-development-skill/archive/main.zip#gorm-dbresolver Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.