kotlin-exposed-patterns

Automates Kotlin database access with Exposed DSL, DAO, coroutine-safe transactions, HikariCP pooling, Flyway migrations, and repositories.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill kotlin-exposed-patterns-jamkris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill kotlin-exposed-patterns-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kotlin applications often struggle to implement a clean, scalable data access layer. This skill provides cohesive Exposed ORM patterns that unify DSL queries, DAO, transactions, connection pooling, migrations, and repository-based access across PostgreSQL-compatible databases.

Core Features & Use Cases

  • DSL and DAO Queries: write type-safe SQL-like queries and entity lifecycle logic with Exposed.
  • Transactional Safety: ensure coroutine-safe, atomic operations via newSuspendedTransaction.
  • Production Configuration: configure HikariCP pooling and Flyway migrations for reliable deployments.
  • Repository Pattern: encapsulate data access behind a clean interface for testability and maintainability.
  • Use Case: build a scalable Kotlin service with a robust data layer across microservices.

Quick Start

Install and integrate the Exposed-based patterns in your Kotlin project to begin implementing domain models, transactions, and repositories immediately.

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 access in a coroutine environment?

Use Kotlin Exposed ORM with newSuspendedTransaction to ensure coroutine-safe, atomic database operations. This approach integrates DSL and DAO queries while maintaining transactional safety across suspended functions, preventing blocking calls on coroutine dispatchers.

What's the best way to structure Kotlin Exposed repository patterns for microservices?

Structure Kotlin Exposed repository patterns by encapsulating DSL queries and DAO entity logic behind clean interfaces. This abstraction separates data access from business logic, ensuring testability and maintainability across scalable microservices.

How do I configure HikariCP connection pooling with Kotlin Exposed?

Configure HikariCP connection pooling with Kotlin Exposed by defining pool size, timeout, and leak detection properties in your application setup. This production-grade configuration ensures reliable database connection management and deployment stability.

Can I run Flyway database migrations alongside Kotlin Exposed ORM?

Yes, you can run Flyway database migrations alongside Kotlin Exposed ORM. Flyway manages schema versioning and migration scripts independently, while Exposed handles type-safe DSL and DAO queries across the PostgreSQL-compatible database.

When do I need to choose between Exposed DSL and DAO queries?

Choose Exposed DSL for type-safe SQL-like queries requiring fine-grained control, and DAO for entity lifecycle logic and relationship mapping. Both are supported within the repository pattern to handle different data access requirements efficiently.