kotlin-exposed-patterns

Automate Kotlin Exposed ORM patterns with DSL, DAO, and coroutine-safe transactions.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/riftzen-bit/gemini-setup --skill kotlin-exposed-patterns-riftzen-bit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kotlin-exposed-patterns
Source: https://github.com/riftzen-bit/gemini-setup/tree/main/skills/kotlin-exposed-patterns
Command: npx skills add https://github.com/riftzen-bit/gemini-setup --skill kotlin-exposed-patterns-riftzen-bit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

JetBrains Exposed ORM patterns address structured Kotlin database access, covering both DSL and DAO styles, with clean transaction handling and production-ready configuration.

Core Features & Use Cases

  • DSL for type-safe SQL queries and table definitions with Kotlin exmodels.
  • DAO pattern for entity lifecycle management and repository integration.
  • Production-ready configuration including HikariCP, Flyway migrations, and coroutine-safe transactions.
  • Use Case: Setting up a Kotlin service that interacts with PostgreSQL, performing migrations at startup and using Exposed tables to query and persist data.

Quick Start

Configure your Kotlin project to initialize Exposed, set up a PostgreSQL datasource with HikariCP, run Flyway migrations, and start coroutines with newSuspendedTransaction blocks.

Frequently Asked Questions about kotlin-exposed-patterns

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

FAQPage Schema
How do I manage Kotlin Exposed transactions with coroutines?

Kotlin Exposed transactions can be managed safely in coroutines using newSuspendedTransaction blocks. This approach ensures non-blocking database access and maintains transaction integrity across PostgreSQL-backed environments within your Kotlin services.

What is the best way to structure repository-based data access with Kotlin Exposed?

The best way to structure repository-based data access with Kotlin Exposed is by combining the DAO pattern for entity lifecycle management with type-safe DSL queries. This creates a reusable repository abstraction separating query logic from business logic.

How do I configure HikariCP connection pooling and Flyway migrations for a Kotlin Exposed service?

You configure HikariCP connection pooling and Flyway migrations for a Kotlin Exposed service by initializing a PostgreSQL datasource and executing Flyway migrations at startup. This provides production-ready database connection handling and schema versioning.

Does the Kotlin Exposed ORM support both DSL and DAO styles?

Yes, the Kotlin Exposed ORM supports both DSL and DAO styles. The DSL style enables type-safe SQL queries and table definitions, while the DAO style manages entity lifecycles and integrates seamlessly with repository patterns.

How do I define type-safe SQL queries and table definitions in Kotlin Exposed?

You define type-safe SQL queries and table definitions in Kotlin Exposed using its DSL API with Kotlin exmodels. This allows you to construct strongly-typed database queries and schema structures directly within your Kotlin codebase.

Can I use Kotlin Exposed ORM patterns for a PostgreSQL-backed application?

Yes, you can use Kotlin Exposed ORM patterns for PostgreSQL-backed applications. These patterns configure a PostgreSQL datasource with HikariCP, run Flyway migrations, and utilize Exposed tables to query and persist data reliably.