Docs

Exposed

Kotlin SQL framework.

What is Exposed

Exposed is JetBrains’ SQL library offering both a typed SQL DSL and a lightweight DAO layer.

Install

gradle
kotlin
implementation("org.jetbrains.exposed:exposed-core:0.55.0")

Usage

kotlin
kotlin
object Users : Table() {
    val id = integer("id").autoIncrement()
    val name = varchar("name", 50)
}

transaction { Users.selectAll().forEach { println(it[Users.name]) } }

Docs

Official documentation: Exposed.