kotlin-exposed-patterns

Standardize database access in Kotlin with Exposed ORM patterns.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/ThejanaJayalath/Niolla-PM-system --skill kotlin-exposed-patterns-thejanajayalath
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/ThejanaJayalath/Niolla-PM-system/tree/main/.cursor/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/ThejanaJayalath/Niolla-PM-system --skill kotlin-exposed-patterns-thejanajayalath

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires org.jetbrains.exposed:exposed-core, org.jetbrains.exposed:exposed-dao, org.jetbrains.exposed:exposed-jdbc, org.postgresql:postgresql, 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 injection or transaction management errors.

Core Features & Use Cases

  • Exposed ORM Patterns: Provides standardized approaches for both DSL-based queries and DAO-based entity management.
  • Production-Ready Configuration: Includes patterns for HikariCP connection pooling, Flyway migrations, and coroutine-safe transaction handling.
  • Use Case: Use this skill to architect a clean repository layer for a new microservice, ensuring that business logic remains decoupled from database implementation details while maintaining high performance and testability.

Quick Start

Use the kotlin-exposed-patterns skill to generate a repository implementation for a new database table 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 type-safe repository layer in Kotlin using Exposed ORM?

To implement a type-safe repository layer in Kotlin using Exposed ORM, use standardized DSL-based query patterns and DAO entity management. This approach decouples business logic from database implementation details while maintaining high testability and preventing common SQL injection errors.

What is the best way to configure HikariCP connection pooling with Kotlin Exposed?

The best way to configure HikariCP connection pooling with Kotlin Exposed involves setting up production-ready configuration patterns. These patterns ensure efficient JDBC connection management for JVM-based backend services, preventing connection leaks and optimizing database throughput.

How do you handle coroutine-aware transaction management in Kotlin Exposed?

Coroutine-aware transaction management in Kotlin Exposed requires specific patterns to ensure thread-safe database operations. These patterns facilitate non-blocking transaction handling within coroutine contexts, preventing blocking calls from stalling asynchronous JVM backend services.

Does Kotlin Exposed work with Flyway for database schema migrations?

Yes, Kotlin Exposed works with Flyway for database schema migrations. Production-ready configuration patterns include Flyway integration to version and execute schema changes safely, ensuring database structures remain synchronized with Exposed entity definitions across microservice deployments.

When should I use DSL-based queries versus DAO entities in Kotlin Exposed?

Use DSL-based queries in Kotlin Exposed for type-safe SQL generation when you need fine-grained control over complex joins. Use DAO-based entity management when you prefer an object-oriented abstraction for standard CRUD operations on single database tables.

Can I use Kotlin Exposed for PostgreSQL database operations in a microservice?

Yes, you can use Kotlin Exposed for PostgreSQL database operations in a microservice. The framework provides standardized repository patterns and type-safe SQL generation specifically supporting PostgreSQL, ensuring robust data access logic for JVM-based backend services.