kotlin-exposed-patterns

Implement type-safe database access layers in Kotlin with JetBrains Exposed ORM.

Updated May 9, 2026
One-click install
npx skills add https://github.com/kk20300113-png/my-claude-skills --skill kotlin-exposed-patterns-kk20300113-png
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/kk20300113-png/my-claude-skills/tree/main/kotlin-exposed-patterns
Command: npx skills add https://github.com/kk20300113-png/my-claude-skills --skill kotlin-exposed-patterns-kk20300113-png

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the boilerplate and inconsistency of building custom database access layers in Kotlin applications, providing production-tested patterns for JetBrains Exposed ORM that ensure coroutine safety, maintainability, and scalability.

Core Features & Use Cases

  • Dual Query Patterns: Use Exposed's DSL for direct SQL-like type-safe queries or DAO for full entity lifecycle management, depending on your use case.
  • Production Configuration: Set up HikariCP connection pooling, Flyway versioned database migrations, and configurable transaction isolation levels for production deployments.
  • Testable Architecture: Implement the repository pattern to decouple business logic from data access, enabling seamless testing with in-memory H2 databases.
  • Advanced Query Support: Handle complex operations including joins, aggregations, pagination, batch inserts/upserts, and JSONB column storage with kotlinx.serialization.
  • Use Case: For example, use this Skill to build a user and order management service that supports paginated user search, order history lookups, and atomic fund transfers with proper transaction safety.

Quick Start

Use the kotlin-exposed-patterns skill to implement a coroutine-safe user repository with pagination and JSONB metadata support for your Kotlin Ktor application.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I implement the repository pattern with Kotlin Exposed for database access?

To implement the repository pattern with Kotlin Exposed, decouple business logic from data access by wrapping DSL queries or DAO entity management inside repository classes, enabling seamless testing with in-memory H2 databases.

How do I configure HikariCP connection pooling with Exposed ORM in a Kotlin backend?

Configuring HikariCP connection pooling with Exposed ORM involves setting up production-grade JDBC connection properties and configurable transaction isolation levels to ensure scalable and reliable database access in Kotlin applications.

Does the Exposed ORM support coroutine-safe database transactions?

Yes, Exposed ORM supports coroutine-safe database transactions by applying transaction wrappers that maintain coroutine contexts, ensuring safe and reliable concurrent database access in Kotlin backend development.

What is the best way to handle JSONB column operations and joins in Kotlin Exposed?

Handling JSONB column operations and joins in Kotlin Exposed requires using advanced query support features, leveraging kotlinx serialization for JSONB storage and type-safe DSL queries for complex data aggregations.

Can I use Flyway database migrations with Exposed ORM for production Kotlin applications?

Yes, you can use Flyway database migrations with Exposed ORM to apply versioned schema changes, ensuring maintainable and production-ready database configurations for your Kotlin backend applications.

When should I use DSL queries vs DAO entities in Kotlin Exposed?

Use DSL queries in Kotlin Exposed for direct SQL-like type-safe operations, and switch to DAO entities when you need full entity lifecycle management, choosing based on specific use case complexity.