kotlin-exposed-patterns

Provide Exposed ORM patterns for Kotlin database access with DSL, DAO, HikariCP, and Flyway.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lllooollpp/solopreneur- --skill kotlin-exposed-patterns-lllooollpp
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/lllooollpp/solopreneur-/tree/main/solopreneur/data/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/lllooollpp/solopreneur- --skill kotlin-exposed-patterns-lllooollpp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides tested patterns for using JetBrains Exposed ORM in Kotlin applications, including DSL and DAO styles, reliable transactions, and production-ready setup, reducing boilerplate and improving data layer maintainability.

Core Features & Use Cases

  • DSL queries: Simple, type-safe SQL-like queries using Exposed's DSL.
  • DAO pattern & repositories: Entity lifecycle management with a repository abstraction for testability.
  • Production-ready config: HikariCP pooling, Flyway migrations, and coroutine-safe transactions.
  • Practical examples: End-to-end patterns for users, orders, and related data models; testing with in-memory databases.

Quick Start

Install and integrate Exposed patterns in your Kotlin project to start building a robust data access layer.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I use Kotlin Exposed ORM for database transactions in coroutines?▼

Use Kotlin Exposed ORM for database transactions in coroutines by applying newSuspendedTransaction to ensure coroutine-safe execution. This pattern provides reliable, testable data access without blocking threads.

What is the best way to set up HikariCP connection pooling with Kotlin Exposed?▼

The best way to set up HikariCP connection pooling with Kotlin Exposed is through production-ready configuration patterns. This ensures robust data access and efficient connection management for Kotlin services.

How do I structure repository patterns using Exposed DSL and DAO queries?▼

Structure repository patterns using Exposed DSL and DAO queries by wrapping entity lifecycle management in a repository abstraction. This approach significantly improves testability and reduces boilerplate in your data layer.

Does Flyway database migration work with Kotlin Exposed patterns?▼

Yes, Flyway database migration works with Kotlin Exposed patterns to deliver production-ready schema management. Combining them ensures reliable database versioning alongside robust data access configuration.

How to test Kotlin Exposed data layers using in-memory databases?▼

Test Kotlin Exposed data layers using in-memory databases to validate repository abstractions and transaction logic. This pattern provides practical, end-to-end testing for users, orders, and related data models.

When should I choose Exposed DSL queries over the DAO pattern in Kotlin?▼

Choose Exposed DSL queries over the DAO pattern in Kotlin when you need simple, type-safe SQL-like statements. Use the DAO pattern when you require structured entity lifecycle management and a repository abstraction.