Kunal Dabir09/02/2021, 2:34 PM
Want harness true power of SQL without writing boilerplate JDBC code? We will explore a zero cost (both in terms of startup time and runtime overhead), reflection-free, annotation-free, bytecode-manipulation-free, and a type-safe way to write your Persistence Layer in Kotlin.
ORMs are great but not suitable in every situations. We will start by exploring some such situations. We will see how to connect to and execute queries against PostgreSQL in Kotlin without requiring any ORM or boilerplate code. We will be able to write immutable data classes (which may not be possible with ORMs) that will be mapped from database result. We will see how changes in database schema can be detected at compile time leading us towards more type-safe and maintainable codebase.