kotlin-exposed-patterns

Generates Kotlin database access code with Exposed ORM, HikariCP pooling, Flyway migrations, and H2 testing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the tedious, error-prone work of writing repetitive boilerplate for Kotlin database access, ensuring consistent, type-safe, and maintainable data layer code for backend services.

Core Features & Use Cases

  • Dual Query APIs: Use Exposed's type-safe DSL for direct SQL-like queries or DAO pattern for entity lifecycle management.
  • Production-Grade Configuration: Set up HikariCP connection pooling, Flyway database migrations, and coroutine-safe transaction handling for scalable Kotlin applications.
  • Use Case: A Kotlin backend team can use this skill to implement a user repository with pagination, JSON column support, and in-memory H2 testing without rewriting common database boilerplate.

Quick Start

Use the kotlin-exposed-patterns skill to build a paginated user repository with Exposed DSL queries and HikariCP connection pooling for your Kotlin backend service.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I set up Kotlin Exposed ORM with HikariCP connection pooling?

To set up Kotlin Exposed ORM with HikariCP, configure production-grade connection pooling alongside Flyway database migrations and coroutine-safe transaction handling. This establishes a scalable database layer for backend services without repetitive boilerplate.

What is the best way to implement the repository pattern in Kotlin using Exposed?

The best way to implement the repository pattern in Kotlin using Exposed is combining type-safe DSL queries with DAO entity management. This approach supports pagination, JSON column handling, batch operations, and in-memory H2 testing for production-ready data layers.

Can I use Exposed DSL queries for batch operations and JSON column support?

Yes, you can use Exposed DSL queries for batch operations and JSON column support. The framework provides type-safe SQL-like querying capabilities that meet requirements for complex data manipulation without writing tedious boilerplate code.

Does Flyway work with Exposed ORM for database migrations in Kotlin?

Flyway works with Exposed ORM to manage database migrations in Kotlin. Integrating Flyway ensures consistent schema evolution across your backend services while Exposed handles type-safe data access and coroutine-safe transactions.

How do I test Kotlin Exposed repositories using in-memory H2?

To test Kotlin Exposed repositories using in-memory H2, implement testable repository patterns that support in-memory H2 testing. This allows you to validate pagination, JSON column support, and transaction logic without setting up a full production database environment.

Why use Exposed DAO pattern versus DSL queries for Kotlin database access?

Use the Exposed DAO pattern for entity lifecycle management or DSL queries for direct SQL-like type-safe operations. Both eliminate repetitive boilerplate, but DAO tracks entity states while DSL offers flexible, direct database access for Kotlin backend services.