gorm-gorm-config

Community

Initialize GORM with safe, performant defaults.

Authorliurida
Version1.0.0
Installs0

System Documentation

What problem does it solve?

GORM initialization involves many configuration options that affect performance, naming, logging, time handling, and migration behavior, and misconfiguration can lead to slow queries, unsafe global updates, or incompatible migrations.

Core Features & Use Cases

  • Performance tuning: Control SkipDefaultTransaction and PrepareStmt to improve throughput for write-heavy workloads and repeated queries.
  • Naming and schema control: Configure NamingStrategy to apply table prefixes, singular/plural rules, and custom name replacements for consistent schema generation.
  • Operational controls: Provide custom Logger, override NowFunc for timestamp consistency, use DryRun for SQL generation, and toggle foreign key creation during AutoMigrate.
  • Use case: Prepare a production deployment by enabling prepared statements, enforcing safe update/delete behavior, and standardizing table names before running migrations.

Quick Start

Initialize GORM with a gorm.Config that enables PrepareStmt, configures a NamingStrategy with a table prefix, sets a UTC NowFunc, and enforces safe update behavior.

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

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.