affaan-m avatar

Kotlin Exposed Patterns

This gives you production-ready patterns for JetBrains Exposed ORM with all the setup details you actually need. It covers both query styles (DSL for SQL-like expressions, DAO for entity lifecycle), HikariCP connection pooling with proper isolation levels, Flyway migrations, and a repository pattern that keeps your business logic decoupled from the data layer. The examples show real things like JSONB columns, composite primary keys, joins with aggregations, and how to wrap everything in `newSuspendedTransaction` blocks for coroutine safety. If you're building a Kotlin backend and want to avoid reinventing database plumbing, this handles the boring infrastructure parts so you can focus on queries.

skills.sh installs
5.4K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill kotlin-exposed-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

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

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Mobile Development, Java & JVM, Databases, Web3 & Blockchain
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1vercel avatarworkflowvercel/workflowCreates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on5.4Kskills.sh installs
2jeffallan avatarsecure-code-guardianjeffallan/claude-skillsUse when implementing authentication/authorization, securing user input, or preventing OWASP Top 10 vulnerabilities — including custom security implementations 5.4Kskills.sh installs
3affaan-m avatarquarkus-securityaffaan-m/eccQuarkus Security best practices for authentication, authorization, JWT/OIDC, RBAC, input validation, CSRF, secrets management, and dependency security.5.4Kskills.sh installs
4starchild-ai-agent avatarproject-builderstarchild-ai-agent/official-skillsEnd-to-end project engineering: design, incremental build, verify, debug systematically. Use when building software, dashboards, scheduled jobs, or web apps the5.2Kskills.sh installs
5grafana avatartempografana/skillsStand up Grafana Tempo as a cost-efficient distributed-tracing backend that only needs object storage, and write TraceQL queries against it. Covers OTLP + Jaege5.2Kskills.sh installs
6forcedotcom avatardata360-schema-getforcedotcom/sf-skillsRetrieve Data Lake Object (DLO) and Data Model Object (DMO) schema information from Salesforce Data Cloud using REST APIs. Use this skill when you need to inspe5.1Kskills.sh installs