kotlin-exposed-patterns

Provide database access patterns for Kotlin using JetBrains Exposed ORM.

1|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/its-Basudeba/Care-HMS --skill kotlin-exposed-patterns-its-basudeba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/its-Basudeba/Care-HMS/tree/main/.agent/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/its-Basudeba/Care-HMS --skill kotlin-exposed-patterns-its-basudeba

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires org.jetbrains.exposed:exposed-core, org.jetbrains.exposed:exposed-dao, org.jetbrains.exposed:exposed-jdbc, com.zaxxer:HikariCP, org.flywaydb:flyway-core.

What problem does it solve?

This Skill addresses the complexity of implementing robust, type-safe database access layers in Kotlin applications, reducing boilerplate and preventing common SQL errors.

Core Features & Use Cases

  • Dual Query Styles: Provides patterns for both DSL-based SQL expressions and DAO-based entity lifecycle management.
  • Production-Ready Configuration: Includes templates for HikariCP connection pooling, Flyway migrations, and coroutine-safe transaction handling.
  • Use Case: Use this Skill to architect a clean repository pattern that decouples your business logic from the database, enabling easier unit testing with in-memory H2 databases.

Quick Start

Use the kotlin-exposed-patterns skill to generate a repository implementation for a new user entity using the DSL query style.

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 a repository pattern with Kotlin Exposed ORM?

To implement a repository pattern with Kotlin Exposed, use the DSL query style or DAO entity management to decouple business logic from database operations, enabling easier unit testing with in-memory H2 databases.

What's the best way to configure connection pooling for Kotlin Exposed?

The best way to configure connection pooling for Kotlin Exposed is using HikariCP templates, which manage production-ready database connections alongside Flyway for automated schema migrations.

Does Kotlin Exposed support coroutine-safe database transactions?

Yes, Kotlin Exposed supports coroutine-safe transaction handling, ensuring type-safe SQL operations and concurrent database access are managed correctly within Kotlin coroutine contexts.

How do I manage database schema migrations when using Kotlin Exposed?

You manage database schema migrations with Kotlin Exposed by integrating Flyway, which provides automated migration execution to keep your PostgreSQL or other database schemas versioned and consistent.

What is the difference between DSL and DAO query styles in Kotlin Exposed?

The difference between DSL and DAO in Kotlin Exposed is that DSL uses type-safe SQL expressions for direct queries, while DAO manages entity lifecycles, allowing you to choose based on your architectural needs.

Can I use Kotlin Exposed for production-grade PostgreSQL applications?

Yes, you can use Kotlin Exposed for production-grade PostgreSQL applications by combining HikariCP connection pooling, Flyway migrations, and coroutine-safe transactions to ensure robust database access.