kotlin-exposed-patterns

Implement Kotlin data access with JetBrains Exposed DSL and DAO patterns.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/cescrafli/compyrasion --skill kotlin-exposed-patterns-cescrafli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/cescrafli/compyrasion/tree/main/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/cescrafli/compyrasion --skill kotlin-exposed-patterns-cescrafli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

JetBrains Exposed ORM patterns provide structured and production-ready approaches to database access in Kotlin, covering both DSL queries and DAO lifecycle management, along with reliable transaction handling and configuration.

Core Features & Use Cases

  • DSL queries and DAO pattern for flexible data access
  • Transaction management with newSuspendedTransaction for coroutine safety
  • HikariCP for production-grade connection pooling
  • Flyway migrations for versioned database schemas
  • Repository pattern for decoupled, testable data layers
  • JSON column support and advanced query techniques

Quick Start

Follow this guide to implement robust Exposed-based data access with DSL and DAO patterns in a Kotlin project.

Frequently Asked Questions about kotlin-exposed-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to structure a data layer in Kotlin using Exposed ORM?

Kotlin Exposed ORM supports both DSL queries and DAO pattern approaches for flexible data access. You can choose DSL for type-safe SQL construction or DAO for object lifecycle management depending on your specific data access requirements.

How do I manage database transactions safely with Kotlin coroutines in Exposed?

You manage database transactions safely with Kotlin coroutines in Exposed by utilizing newSuspendedTransaction. This function ensures transactional integrity while allowing your database operations to run within coroutine contexts without blocking threads.

How to configure HikariCP connection pooling and Flyway migrations with Kotlin Exposed?

To configure HikariCP connection pooling and Flyway migrations with Kotlin Exposed, you integrate HikariCP for production-grade connection management and Flyway for versioned database schemas. This setup ensures robust transaction handling and reliable schema evolution.

Can I use Kotlin Exposed for in-memory testing of repository patterns?

Yes, you can use Kotlin Exposed for in-memory testing of repository patterns. The framework supports testable patterns that allow you to validate your data access logic and repository abstractions against an in-memory database setup.

Does Kotlin Exposed ORM support JSON columns and advanced query techniques?

Yes, Kotlin Exposed ORM supports JSON columns and advanced query techniques. These features allow you to handle complex data structures and perform sophisticated database queries directly within your Kotlin application's data access layer.