gorm-method-chaining
CommunityFluently chain GORM methods for complex queries
Authorliurida
Version1.0.0
Installs0
System Documentation
What problem does it solve?
GORM's chainable API can lead to unsafe reuse of the gorm DB object, causing query conditions to leak between operations and producing incorrect results, especially in concurrent or multi‑query scenarios.
Core Features & Use Cases
- Method Categorization: Distinguishes chainable, finisher, and new session methods.
- Safe Reuse: Shows how to create isolated sessions with Session or WithContext to prevent state leakage.
- Dynamic Query Building: Demonstrates building queries step‑by‑step, including conditional clauses and pagination.
- Practical Example: Using method chaining to fetch the first ten users older than 18, ordered by name.
Quick Start
Use the gorm-method-chaining skill to safely build a query that retrieves the first ten users older than 18, ordered by name.
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-method-chaining Download link: https://github.com/liurida/gorm-development-skill/archive/main.zip#gorm-method-chaining 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.