kotlin-exposed-patterns

Implement Exposed ORM data access patterns with DSL queries, DAO lifecycle, and transactions.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/caovinhphuc/React-OAS-Integration-v4.0 --skill kotlin-exposed-patterns-caovinhphuc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/caovinhphuc/React-OAS-Integration-v4.0/tree/main/.claude/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/caovinhphuc/React-OAS-Integration-v4.0 --skill kotlin-exposed-patterns-caovinhphuc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, and production-ready configuration for Kotlin-based data layers.

Core Features & Use Cases

  • DSL queries and DAO-based lifecycle management
  • Transaction handling with newSuspendedTransaction and coroutine safety
  • HikariCP configuration and Flyway migrations for production
  • Repository pattern with Exposed integration for clean domain boundaries
  • JSON column support and testing setups

Quick Start

Configure a Kotlin project to use Exposed with DSL and DAO patterns, including HikariCP pooling and Flyway migrations, and implement a sample User repository.

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 database transactions safely with Kotlin coroutines in Exposed?

To manage transactions safely with Kotlin coroutines in Exposed, use the newSuspendedTransaction function. This pattern ensures transactional safety and maintains coroutine context across suspended database operations without blocking threads.

How do I configure HikariCP connection pooling with Kotlin Exposed?

Configure HikariCP connection pooling with Kotlin Exposed by binding a HikariDataSource to your Exposed Database.connect call. This setup provides production-ready connection management for typical server backends, ensuring efficient resource reuse across database queries.

Can I use Flyway migrations with Exposed ORM in a Kotlin application?

Yes, you can use Flyway migrations with Exposed ORM in a Kotlin application. This pattern integrates Flyway to manage database schema evolutions alongside Exposed DSL queries and DAO lifecycle management for a robust production data layer.

What is the best way to structure a repository pattern using Kotlin Exposed?

The best way to structure a repository pattern using Kotlin Exposed is to wrap DSL queries and DAO lifecycle management within clean domain boundaries. This isolates database interactions from business logic, ensuring maintainable and testable Kotlin server backends.

Does the Exposed ORM support JSON columns and lightweight database testing in Kotlin?

Yes, Exposed ORM supports JSON columns and lightweight database testing in Kotlin. You can implement JSON column support for flexible data storage and use in-memory or lightweight databases to build an effective test strategy for your data layer.

Do I need PostgreSQL to use these Kotlin Exposed patterns?

You do not strictly need PostgreSQL, but it is recommended. These Kotlin Exposed patterns require a PostgreSQL or compatible database to manage database interactions, alongside Kotlin, Exposed core libraries, and coroutine support for typical server backends.