Skip to content

KapperA Fresh Look at ORMs for Kotlin and the JVM

SQL is not a problem to be solved - it's a powerful tool to be embraced

Kapper Logo

Quick Example

kotlin
data class SuperHero(val id: UUID, val name: String, val email: String?, val age: Int?)

// Simple query
val heroes = dataSource.connection.use {
    it.query<SuperHero>("SELECT * FROM super_heroes WHERE age > :age", "age" to 30)
}

// Single result
val batman = dataSource.connection.use {
    it.querySingle<SuperHero>(
        "SELECT * FROM super_heroes WHERE name = :name", 
        "name" to "Batman"
    )
}

// Execute statement
dataSource.connection.use {
    it.execute(
        "INSERT INTO super_heroes(id, name, email, age) VALUES(:id, :name, :email, :age)",
        "id" to UUID.randomUUID(),
        "name" to "Wonder Woman",
        "email" to "wonder@dc.com", 
        "age" to 3000
    )
}

Performance That Speaks for Itself

Kapper Performance Benchmarks

Kapper consistently outperforms other ORMs while maintaining the simplicity and transparency of SQL.

Released under the Apache 2.0 License.