kotlin-exposed-patterns

Implement Kotlin database access with Exposed ORM, HikariCP, and Flyway.

2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/klu-dev/porting-ecc-to-vscode --skill kotlin-exposed-patterns-klu-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/klu-dev/porting-ecc-to-vscode/tree/main/.github/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/klu-dev/porting-ecc-to-vscode --skill kotlin-exposed-patterns-klu-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires org.jetbrains.exposed:exposed-core, org.jetbrains.exposed:exposed-dao, org.jetbrains.exposed:exposed-jdbc, org.jetbrains.exposed:exposed-kotlin-datetime, org.postgresql:postgresql, com.zaxxer:HikariCP, org.flywaydb:flyway-core, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides a comprehensive approach to database access using JetBrains Exposed ORM patterns, solving the issue of complex and error-prone database operations in Kotlin applications.

Core Features & Use Cases

  • DSL Queries: Write SQL-like queries using Kotlin DSL for direct database manipulation.
  • DAO Pattern: Use the Data Access Object pattern for entity lifecycle management.
  • Transactions: Handle transactions with support for coroutine safety and atomicity.
  • Connection Pooling: Configure connection pooling with HikariCP for efficient database connections.
  • Migrations: Implement database schema changes with Flyway migrations.
  • Repository Pattern: Implement the repository pattern for decoupled data layer and business logic.
  • Use Case: For a Kotlin application that needs to interact with a database, this Skill provides a robust framework to handle all database-related tasks efficiently.

Quick Start

Use the 'kotlin-exposed-patterns' skill to set up and run database operations with Kotlin Exposed, including queries, DAO operations, and transactions.

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 the DAO and Repository patterns in Kotlin Exposed?

You can implement the DAO pattern for entity lifecycle management and the Repository pattern to decouple data access from business logic using Kotlin Exposed ORM. This approach provides a structured framework for robust database interactions.

What's the best way to configure HikariCP connection pooling with a Kotlin ORM?

Configuring HikariCP connection pooling with the Kotlin Exposed ORM ensures efficient database connections. This setup manages connection allocation, preventing leaks and optimizing database throughput in Kotlin applications.

How does Flyway handle database schema migrations in Kotlin applications?

Flyway handles database schema migrations by applying versioned SQL changes to your database. When integrated with Kotlin Exposed, it ensures your database structure stays synchronized with your application's data access layer.

Do I need PostgreSQL to use Kotlin Exposed ORM patterns?

PostgreSQL is included as the specific JDBC driver dependency for this Skill, but Kotlin Exposed ORM patterns can operate with other databases. You require Exposed core, DAO, and JDBC libraries alongside HikariCP and Flyway for full operation.

Can I write SQL-like DSL queries in Kotlin Exposed for direct database manipulation?

Yes, Kotlin Exposed allows you to write SQL-like queries using its Kotlin DSL for direct database manipulation. This feature lets you construct type-safe queries that integrate directly with your Kotlin codebase.

Are transactions in Kotlin Exposed coroutine-safe?

Transactions in Kotlin Exposed support coroutine safety and atomicity. This ensures that database operations either complete entirely or roll back safely, maintaining data consistency during concurrent Kotlin execution.