0:00 / 0:00
PostgreSQL and Exposed - Kotlin database access
Pairing with Duncan
4.5K subscribers • 13 videos on Hallway
- Recommended by 1 person: 1 in engineering communities.
- Presented by Duncan
- Linked in the descriptionJetBrains/Exposeddmcg/gilded-rose-tdd
- May be out of date. The tools, versions or practices it shows have likely moved on.
Intermediate. Assumes working knowledge.
8.6K views3 years ago1 recommendation
Programming languagesDatabases and dataKotlinPostgresSQL
Duncan explores using the JetBrains Exposed library to read and write data to a PostgreSQL database in Kotlin.
Whether or not we pursue our Event Sourcing experiment from the last episode (youtu.be/o5tmT4kwfI4) we know that we want to store our stock data in a database of some sort. So today we investigate using the JetBrains Exposed library (github.com/JetBrains/Exposed) to write to and read from PostgreSQL (postgresql.org/). Writing tests is a fine way to investigate an API. We can use the tests to invoke functions, and assertions to record what they do, and then work outwards to implement useful and tested code for our application. After evaluating both, in the end I choose jOOQ over Exposed for our database access. See jOOQ and PostgreSQL - youtu.be/0WcNM7UCtmQ jOOQ vs Exposed - youtu.be/6Ji9yKnZ3D8 This is part 61 of an exploration of where a Test Driven Development implementation of the Gilded Rose stock control system might take us in Kotlin. You can see the whole series as a playlist youtube.com/playlist?list=PL1ssMPpyqociJNwykAOB9_KEZVW7BW7m2 and the code on GitHub github.com/dmcg/gilded-rose-tdd If you like this, you’ll probably like my book Java to Kotlin, A Refactoring Guidebook (java-to-kotlin.dev). It's about far more than just the syntax differences between the languages - it shows how to upgrade your thinking to a more functional style. I have some free time between producing videos and working for team Gilded Rose. If you like these videos I'd like to work with you - please get in touch - duncan@oneeyedmen.comWhy it's here
1 person recommends thisWhat people say. Linked as a hands-on evaluation of JetBrains Exposed for database access in Kotlin.