
What is Mikrom?
Mikrom is inspired by Dapper, a popular micro ORM for .NET.
Usage
Note: This library is in an early phase. The API is highly likely to have breaking changes sometimes, but I
would value your feedback on the library design.
Kotlin version compatibility
| Mikrom version | Kotlin version required |
|---|
| 0.7.x+ | 2.4.21 |
| 0.6.x | 2.3.20 |
| 0.5.x | 2.3.10 |
JDBC
Add the Gradle plugin and dependency:
plugins {
id("io.github.kantis.mikrom") version "0.7.0"
}
dependencies {
implementation("io.github.kantis:mikrom-jdbc:0.7.0")
}
Create a JDBC connection and construct a Mikrom instance:
R2DBC
The same API is available as suspending functions on top of an R2DBC ConnectionPool:
dependencies {
implementation("io.github.kantis:mikrom-r2dbc:0.7.0")
}
See the getting started guide for details on placeholders, null handling and streaming.
Philosophy
- Multiplatform design, with JDBC and R2DBC support
- JS and Native variants not currently planned, but possible. Raise an issue if you want them, also include which underlying driver would make sense to use for that platform.
- Explicit transaction management
- Explicit SQL, instead of generated SQL which might not perform well
- Explicit updates, instead of automated tracking
- Convenient DSLs, so explicitness doesn't become tedious
- Code generation through compiler plugins, to support basic Row/Parameter mapping
- Minimal reflection
License
Copyright (C) 2025 Emil Kantis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance the License.
You may obtain a copy of the License at
https:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.
Code from other parties
- A ton of code, including entire infrastructure setup, related to compiler plugins has been copied from Brian Norman's Buildable project
- Some code related to compiler plugins has been copied from Zac Sweers' Metro project