kotlin-exposed-patterns

Implement Kotlin data access with Exposed ORM, DSL queries, DAO, transactions, HikariCP, and Flyway.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill kotlin-exposed-patterns-sakamoto-family-smile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/sakamoto-family-smile/agent_monorepo/tree/main/.claude/skills/ecc/kotlin-exposed-patterns
Command: npx skills add https://github.com/sakamoto-family-smile/agent_monorepo --skill kotlin-exposed-patterns-sakamoto-family-smile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kotlin projects often struggle with choosing and enforcing consistent data access patterns. This skill consolidates JetBrains Exposed ORM patterns (DSL queries, DAO pattern, transactions, HikariCP pooling, Flyway migrations, and repository usage) into a unified, production-ready approach to database access.

Core Features & Use Cases

  • DSL queries for concise SQL-like expressions.
  • DAO pattern and entity lifecycle management for structured data access.
  • Production-ready configuration with HikariCP, Flyway migrations, and repository abstraction.

Quick Start

Install and run the sample to bootstrap a PostgreSQL-backed database and execute a basic CRUD workflow using Exposed.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I manage Kotlin Exposed ORM transactions safely with coroutines?

To manage Kotlin Exposed ORM transactions safely with coroutines, use the newSuspendedTransaction function. This ensures your database operations remain coroutine-safe without blocking threads during execution.

What is the best way to configure HikariCP connection pooling with the Exposed ORM?

Configuring HikariCP connection pooling with the Exposed ORM involves binding a HikariCP DataSource to your Exposed Database instance. This setup provides production-ready connection management and efficient resource pooling for Kotlin services.

How do I run Flyway database migrations in a Kotlin Exposed ORM project?

Running Flyway database migrations in a Kotlin Exposed ORM project involves applying Flyway scripts before initializing your transactions. This ensures proper schema versioning and consistent database state across your Kotlin services.

Should I use the DSL query API or the DAO pattern for Kotlin Exposed data access?

Choosing between the DSL query API and the DAO pattern for Kotlin Exposed data access depends on your structure needs. DSL provides concise SQL-like expressions, while the DAO pattern enforces structured entity lifecycle management.

How do I implement a repository pattern abstraction over Kotlin Exposed DSL queries?

Implementing a repository pattern abstraction over Kotlin Exposed DSL queries involves wrapping your DSL operations within repository classes. This decouples data access logic from your Kotlin business services for cleaner maintainability.