1. Juha Komulainen
  2. dalesbred-kotlin

Source

dalesbred-kotlin /

Filename Size Date modified Message
.idea
src
40 B
1.1 KB
593 B
1.8 KB
4.7 KB

Kotlin-support for Dalesbred

This library contains a set of extensions on top of Dalesbred to make it nicer to use in Kotlin.

val db = Database.forUrlAndCredentials("jdbc:exampleurl", "login", "password")
db.withTransaction {
    db.update("insert into task (title) values (?)", "learn Kotlin")
    db.update("insert into task (title) values (?)", "learn dalesbred-kotlin")
}

data class Task(val title: String)

val tasks = db.findAll<Task>("select title from task")