September 2023
Intermediate to advanced
470 pages
11h 12m
English
To access the database with Kotlin, we’ll use the Exposed library,[41] which is an open source library that supports many databases, written by the same people who wrote Kotlin itself. To use it, we only need to add the dependencies to our gradle.build file:
| | implementation "org.jetbrains.exposed:exposed-core:${exposedVersion}" |
| | implementation "org.jetbrains.exposed:exposed-jdbc:${exposedVersion}" |
| | implementation "org.jetbrains.exposed:exposed-java-time:${exposedVersion}" |
On top of Exposed itself, we need to add the PostgreSQL drivers and a library to parse JSON—more about that later.
| | implementation "org.postgresql:postgresql:${postgresqlVersion}" |
| | implementation "com.beust:klaxon:${klaxonVersion}" ... |
Read now
Unlock full access