Back to Browse

PostgreSQL with Ktor using Exposed || Part 09 - Insert, InsertIgnore & BatchInsert

274 views
Apr 15, 2025
20:37

In this video, we dive into inserting data into PostgreSQL using Ktor and Exposed ORM in Kotlin. You’ll learn how to handle single inserts, return inserted IDs, perform conflict-safe insertions with insertIgnore, and efficiently batch insert multiple records (including from JSON files) for high-performance applications. We’ll cover: ✅ Basic insert operation with Kotlin data classes ✅ Using insertAndGetId to retrieve auto-generated primary keys ✅ Handling conflicts with insertIgnore ✅ insertIgnoreAndGetId for conditional inserts ✅ Batch insert with batchInsert from JSON ✅ JDBC optimization with reWriteBatchedInserts=true 🔗 Resources & Links 📌 Playlist: https://www.youtube.com/playlist?list=PL3_Xm4wcQKw3VJxUiXzWO57wrLAgRp0Hh 📌 Ktor Fundamentals Playlist: https://www.youtube.com/playlist?list=PL3_Xm4wcQKw1DCU1lPSVhuCMYHg-pLVKI 📌 Ktor Project Generator: https://start.ktor.io 📌 Ktor Docs: https://ktor.io 📌 Exposed Docs: https://www.jetbrains.com/help/exposed/home.html 📌 Source Code:https://github.com/akashkamati/ktor-with-postgres #KotlinServerSide #ktor #postgres #exposed #crudoperations #columntransformation #postgresusingkotlin #hikaricp #dockerpostgresadminersetup #backenddevelopment #kotlininbackend #ktorserver #kotlin

Download

0 formats

No download links available.

PostgreSQL with Ktor using Exposed || Part 09 - Insert, InsertIgnore & BatchInsert | NatokHD