« All posts

Generating Typed JDBC Code from SQL Files

Learn about generating typed JDBC code from SQL files for Kotlin.

Kotlin's data access options primarily revolve around Exposed or Hibernate on one end and hand-rolled JDBC on the other. A new approach allows developers to write SQL and generate Kotlin code from it, enhancing safety and reducing errors. This method creates Kotlin data classes from SQL queries, providing a streamlined way to manage data access without needing a live database.