gorm-context

Community

Control timeouts, cancellation, and tracing in GORM.

Authorliurida
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Manage request contexts for GORM to enforce timeouts, cancellation, and traceability across database operations.

Core Features & Use Cases

  • Context propagation through WithContext, tx.Statement.Context, and hooks for consistent cancellation and tracing.
  • Middleware integration with web frameworks (Chi, Gin) to attach context-aware DB sessions to requests.
  • Per-request lifecycle management for queries, updates, and transactions with safe shutdown.

Quick Start

Run a context-aware query by creating a context with timeout and applying it via db.WithContext(ctx) before your first operation.

Dependency Matrix

Required Modules

None required

Components

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-context
Download link: https://github.com/liurida/gorm-development-skill/archive/main.zip#gorm-context

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.