kotlin-exposed-patterns

Implement Kotlin Exposed ORM patterns for database access with HikariCP and Flyway.

12|4|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TeiNam/kiro-with-harness --skill kotlin-exposed-patterns-teinam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/TeiNam/kiro-with-harness/tree/main/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/TeiNam/kiro-with-harness --skill kotlin-exposed-patterns-teinam

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a structured approach to implementing database access patterns in Kotlin using JetBrains Exposed ORM, simplifying database operations and enhancing productivity.

Core Features & Use Cases

  • DSL Queries: Write SQL-like expressions for direct database queries.
  • DAO Pattern: Use Data Access Objects to manage entity lifecycle.
  • Transactions: Ensure atomicity and rollback in business logic.
  • Connection Pooling: Utilize HikariCP for efficient connection management.
  • Migrations: Keep the database schema in sync with Flyway migrations.
  • Use Case: A developer wants to create a Kotlin application that interfaces with a PostgreSQL database. This Skill provides patterns for setting up and querying the database, ensuring the application remains robust and maintainable.

Quick Start

Install the Skill and follow the instructions to set up database access in your Kotlin project.

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 database access patterns with Kotlin Exposed ORM?

Implement Kotlin Exposed patterns by utilizing DSL queries for direct database access or the DAO pattern for entity lifecycle management. This provides structured database operations, transaction atomicity, and maintainable schema integration for Kotlin applications.

What is the best way to manage PostgreSQL connections in Kotlin Exposed?

The best way to manage PostgreSQL connections in Kotlin Exposed is using HikariCP for connection pooling. This ensures efficient connection management, preventing resource exhaustion and improving application performance during high-volume database operations.

How do I handle transactions and rollbacks in Kotlin Exposed?

Handle transactions in Kotlin Exposed by wrapping database operations within transaction blocks to ensure atomicity and automatic rollback on failure. This mechanism guarantees that business logic remains robust and data consistency is maintained during errors.

Does Kotlin Exposed work with Flyway for database migrations?

Yes, Kotlin Exposed works with Flyway to keep your database schema in sync. Integrating Flyway allows you to execute versioned database migrations, ensuring your PostgreSQL schema evolves predictably alongside your Kotlin application logic.

Can I use the DAO pattern instead of DSL queries in Kotlin Exposed?

Yes, you can use the DAO pattern in Kotlin Exposed as an alternative to DSL queries. While DSL queries offer SQL-like expressions for direct access, the DAO pattern manages entity lifecycles, providing a higher-level abstraction for robust database operations.

Do I need kotlinx.serialization to set up Kotlin Exposed with PostgreSQL?

Yes, kotlinx.serialization is listed as a required dependency alongside exposed-core, exposed-dao, and the PostgreSQL driver. It facilitates data serialization within your Kotlin application when implementing database access patterns and querying operations.