gorm-connecting-to-the-database

Connect to multiple databases using GORM with DSN configuration and connection pooling.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/liurida/gorm-development-skill --skill gorm-connecting-to-the-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gorm-connecting-to-the-database
Source: https://github.com/liurida/gorm-development-skill/tree/main/connecting_to_the_database
Command: npx skills add https://github.com/liurida/gorm-development-skill --skill gorm-connecting-to-the-database

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Connects to multiple databases using GORM by providing DSN configuration, driver customization, existing connection reuse, and built-in connection pooling.

Core Features & Use Cases

  • Officially supports MySQL, PostgreSQL, GaussDB, SQLite, SQL Server, TiDB, Oracle Database, and ClickHouse with specific DSN formats and drivers.
  • Demonstrates opening and reusing connections with gorm.Open using the appropriate driver and configuration, including cloud/proxy scenarios.
  • Includes guidance for advanced MySQL configuration, cloud SQL proxy, and robust connection-pooling setups for production workloads.

Quick Start

Create a DSN for your database and initialize GORM with the matching driver.

Frequently Asked Questions about gorm-connecting-to-the-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure GORM connection pooling for production workloads?

Configure GORM connection pooling by applying DSN settings and driver customization during gorm.Open to manage database connections safely under production workloads with built-in pool tuning.

Can I use GORM to connect to ClickHouse and GaussDB?

Yes, GORM connects to ClickHouse and GaussDB using specific DSN formats and official drivers, applying connection pooling and driver customization across supported databases.

What is the correct DSN format for connecting GORM to multiple databases?

The correct DSN format for GORM depends on the specific database driver, with officially supported formats for MySQL, PostgreSQL, SQLite, SQL Server, Oracle, TiDB, GaussDB, and ClickHouse.

Does GORM support connecting through a cloud SQL proxy?

Yes, GORM supports cloud SQL proxy scenarios by applying driver configuration and DSN customization during initialization to establish connections through cloud proxy infrastructure.

How to reuse an existing database connection with GORM?

Reuse an existing database connection in GORM by applying driver customization and passing the existing connection during gorm.Open, maintaining connection pooling configurations across supported databases.

What databases are officially supported by GORM drivers?

GORM officially supports MySQL, PostgreSQL, SQLite, SQL Server, Oracle Database, TiDB, GaussDB, and ClickHouse with dedicated DSN formats and drivers for connection initialization.