kotlin-exposed-patterns

Standardizes Kotlin Exposed DSL and DAO usage for safe database access.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Exposed-based Kotlin data access can become fragmented across projects. This Skill consolidates DSL and DAO patterns, transaction management, and migrations into a cohesive, reusable guide with production-ready examples.

Core Features & Use Cases

  • DSL queries for type-safe SQL inside Kotlin code
  • DAO entities and repositories for lifecycle-managed domain models
  • Transaction handling with coroutine support and robust migrations via Flyway
  • Production-ready configuration patterns (HikariCP, PostgreSQL) and test scaffolding

Quick Start

Create a new Kotlin project, define your first Exposed table, configure HikariCP, and run your first Flyway migration.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I handle database transactions safely in Kotlin coroutines with Exposed?

To handle database transactions safely in Kotlin coroutines with Exposed, use coroutine-safe transaction blocks. This Skill provides production-ready patterns that maintain transactional integrity across multiple modules without blocking async workflows.

What's the best way to structure DSL and DAO patterns in Kotlin Exposed?

The best way to structure DSL and DAO patterns in Kotlin Exposed is to separate type-safe SQL queries from lifecycle-managed domain models. This Skill standardizes both approaches into a cohesive repository interface for testable data access.

How do I configure HikariCP connection pooling with Kotlin Exposed and PostgreSQL?

To configure HikariCP connection pooling with Kotlin Exposed and PostgreSQL, apply production-ready configuration patterns. This Skill provides setup examples for pooling alongside Flyway migrations to ensure robust database connectivity.

Can I use Flyway database migrations alongside Kotlin Exposed?

Yes, you can use Flyway database migrations alongside Kotlin Exposed. This Skill supports robust migration management, allowing you to version your PostgreSQL schema and define table definitions while maintaining transactional integrity.

Does Kotlin Exposed support type-safe SQL queries for backend services?

Yes, Kotlin Exposed supports type-safe SQL queries for backend services through its DSL. This Skill standardizes type-safe DSL usage, ensuring safe data access and query construction directly inside Kotlin code across multiple modules.

How do I create a testable repository interface using Kotlin Exposed DAO?

To create a testable repository interface using Kotlin Exposed DAO, wrap your domain models and lifecycle-managed entities in abstract repository classes. This Skill provides scaffolding for testable data access to simplify backend service testing.