kotlin-exposed-patterns

Configure JetBrains Exposed ORM with HikariCP pooling and Flyway migrations.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill kotlin-exposed-patterns-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/luongldptit/move-ticket --skill kotlin-exposed-patterns-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the boilerplate and inconsistency of building database access layers for Kotlin applications using JetBrains Exposed ORM, providing standardized, coroutine-safe patterns for common data operations.

Core Features & Use Cases

  • Dual Query Styles: Use type-safe DSL queries for direct SQL-like expressions or DAO entities for automatic lifecycle management of data models.
  • Production Configuration: Set up HikariCP connection pooling, Flyway versioned database migrations, and configurable transaction isolation levels for scalable, reliable applications.
  • Testable Architecture: Implement the repository pattern to decouple business logic from data access, enabling seamless testing with in-memory H2 databases.
  • Use Case Example: Build a user management service that supports paginated user search, order-user joins, and JSONB metadata storage without writing raw SQL.

Quick Start

Use the kotlin-exposed-patterns skill to implement a coroutine-safe user repository with paginated search functionality and HikariCP connection pooling for your Kotlin backend service.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I set up type-safe database access in Kotlin using Exposed ORM?

To set up type-safe database access in Kotlin using Exposed ORM, you can use the DSL query style for direct SQL-like expressions or the DAO entity style for automatic lifecycle management of your data models, ensuring maintainable data operations without raw SQL.

How do I configure HikariCP connection pooling and Flyway migrations for a Kotlin backend?

Configuring HikariCP connection pooling and Flyway versioned database migrations for a Kotlin backend involves setting up production-ready database configurations with proper transaction isolation levels, ensuring scalable and reliable application performance using Exposed ORM.

Does Exposed ORM support Kotlin coroutines for database transactions?

Exposed ORM supports Kotlin coroutines for database transactions by providing coroutine-safe transaction handling, allowing you to build maintainable backend services that execute database operations asynchronously without blocking threads.

What is the best way to implement the repository pattern with Exposed ORM for testing?

The best way to implement the repository pattern with Exposed ORM is to decouple business logic from data access, enabling seamless testing with in-memory H2 databases while maintaining type-safe query construction and DAO entity lifecycle management.

Can I handle JSONB columns and paginated queries in Kotlin Exposed?

You can handle JSONB column support and paginated query logic in Kotlin Exposed by utilizing its type-safe DSL query construction, allowing you to perform complex operations like order-user joins and metadata storage without writing raw SQL.

When should I choose between Exposed DSL queries and DAO entities?

Choose Exposed DSL queries when you need direct SQL-like type-safe expressions for specific data retrieval, and choose DAO entities when you require automatic lifecycle management of data models, allowing you to mix both query styles within the same Kotlin application.