kotlin-exposed-patterns

Configure Kotlin Exposed ORM with HikariCP, Flyway, and coroutine-safe transactions.

2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/Throokie/claude-code-skills --skill kotlin-exposed-patterns-throokie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/Throokie/claude-code-skills/tree/main/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/Throokie/claude-code-skills --skill kotlin-exposed-patterns-throokie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designing scalable and testable data access layers in Kotlin can be difficult; this guide consolidates JetBrains Exposed ORM usage patterns, including DSL queries, DAO lifecycles, transaction management, and repository integration, plus practical configuration guidance for production-grade apps.

Core Features & Use Cases

  • DSL queries and DAO patterns for Kotlin Exposed
  • Transaction management, isolation examples, and testable repositories
  • HikariCP configuration and Flyway migrations
  • Repository pattern with coroutine-friendly data access strategies
  • Use cases include building robust data layers for services and microservices that interact with PostgreSQL or other supported databases.

Quick Start

Create a Kotlin module that wires Exposed with HikariCP and Flyway, and run a simple in-memory test to validate basic CRUD operations.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I build a repository pattern with Kotlin Exposed?

Build a repository pattern with Kotlin Exposed by implementing DSL queries and DAO lifecycles within transactional boundaries. This approach creates testable data access layers for server-side Kotlin services interacting with production-grade databases like PostgreSQL.

How do I manage transactions safely with Exposed in Kotlin coroutines?

Manage transactions safely with Exposed in Kotlin coroutines by applying coroutine-friendly transaction strategies. This ensures transactional integrity and proper isolation across concurrent data access operations in server-side Kotlin microservices.

Can I use Exposed with HikariCP and Flyway migrations in Kotlin?

Yes, you can use Exposed with HikariCP and Flyway migrations in Kotlin. Configuration patterns are provided to wire connection pooling via HikariCP and manage database schema evolution via Flyway for robust production-grade data access.

What are the differences between DSL and DAO patterns in Kotlin Exposed?

The differences between DSL and DAO patterns in Kotlin Exposed lie in abstraction levels. DSL queries offer SQL-like syntax for direct database access, while DAO provides object lifecycle management, both usable within testable repository implementations.

How do I test Exposed repositories in a Kotlin service?

Test Exposed repositories in a Kotlin service by running validations against an in-memory database to confirm basic CRUD operations. This verifies transactional integrity and repository implementations without requiring a full production-grade PostgreSQL setup.

Why do I need Flyway migrations for a Kotlin Exposed data layer?

You need Flyway migrations for a Kotlin Exposed data layer to handle database schema evolution reliably. Pairing Flyway with Exposed ensures consistent schema states across production-grade databases, preventing data access failures in server-side Kotlin microservices.