Agent skill · software engineering · affaan-m
kotlin-exposed-patterns
JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern. Use when working with the Exposed ORM — DSL or DAO queries, transactions, pooling, or migrations.
Why this skill is useful
Adds executable scripts for database access patterns, connection pooling, and migrations that enhance the AI's capabilities with JetBrains Exposed ORM.
What it needs
Requires flyway, hikaricp installed locally. About 8k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.
What this skill does
Kotlin Exposed Patterns Comprehensive patterns for database access with JetBrains Exposed ORM, including DSL queries, DAO, transactions, and production-ready configuration. When to Use Setting up database access with Exposed Writing SQL queries using Exposed DSL or DAO Configuring connection pooling with HikariCP Creating database migrations with Flyway Implementing the repository pattern with Exposed Handling JSON columns and complex queries How It Works Exposed provides two query styles: DSL for direct SQL-like expressions and DAO for entity lifecycle management. HikariCP manages a pool of reusable database connections configured via HikariConfig. Flyway runs versioned SQL migration scripts at startup to keep the schema in sync. All database operations run inside newSuspendedTransaction blocks for coroutine safety and atomicity. The repository pattern wraps Exposed queries behind an interface so business logic stays decoupled from the data layer and tests can use an in-memory H2 database. Examples DSL Query DAO Entity Usage HikariCP Configuration Database Setup HikariCP Connection Pooling Flyway Migrations Migration Files Table Definitions DSL Style Tables Composite Tables DSL Queries Basic CRUD Advanced Queries Pagination Batch Operations DAO Pattern Entity Definitions DAO Operations Transactions Suspend Transaction Support Transaction Isolation Repository Pattern Interface Definition Exposed Implementation JSON Columns JSONB with kotlinx.serialization Testing with Exposed In-Memory Database for Tests `kotlin class UserRepositoryTest : FunSpec({ lateinit var database: Database lateinit var repository: UserRepository beforeSpec { database = Database.connect( url = "jdbc:h2:mem:test;DBCLOSEDELAY=-1;MODE=PostgreSQL", driver = "org.h2.Driver", ) transaction(database) { SchemaUtils.create(UsersTable) } repository = ExposedUserRepository(database) } beforeTest { transaction(database) { UsersTable.deleteAll() } } test("create and find user") { val user = repository.crea …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills affaan-m/kotlin-exposed-patterns--3b537e