<@UNQTDPQHX> Hey, here is my proof of concept how ...
# ktor
s
@Magno Junior Hey, here is my proof of concept how wiring of the Flyway with the ktor config file could look like. I used the libraries I'm going to use in my real project. https://github.com/szymonlipinski/ktor-flyway
m
@Szymon Lipiński thank you very much for share 🙇 I will take a look as soon as I arrive at home
@Szymon Lipiński I could not answer you properly yet about this thing. I really like the way that you create this FlywayMigrations.kt (https://github.com/szymonlipinski/ktor-flyway/blob/master/src/com/example/flyway/FlywayMigrations.kt) and how you use it on the rest of your code. I am still trying to think this way. really, thank you again for this code.
s
Thanks. I think there is lot of places to improve the code. It was just an idea. In my real project I had to make some bigger refactoring. However, I think the general idea is fine.
m
@Szymon Lipiński I see you are using JDBI. Are you using it on "real scenario" as well? 🤔
s
Yes. I like the declarative api: http://jdbi.org/#_declarative_api
m
yes... that's awesome. I mean, now I am using hibernates/jpa everywhere, but I like to see people in kotlin (not only here) is trying to avoid the classic ORM
s
ORMs are fine for simple CRUD, however, in many situations you need to use some specific database features to get really fast queries, and suddenly the ORM is not fine.
m
yes.. I completely agree
s
m
wow.. I need to see this carefully. I did it in the past using oracle and pl/sql.... but it was painful.
I fell like returning to year 2000 and something
s
🙂 Sometimes simple functions can help a lot. The main trick is that the data doesn't need to travel to application. This way the stuff can be much faster. However, ORMs cannot handle that. In a previous project, I was working with, we used only sql, and it was pretty nice. Of course for each such dao function there had to be at least one test to check if the sql doesn't have any syntax issues (this is something the ORMs handle pretty well).
Generally I'd love to have an ORM for simple stuff and be able to use complex sql mapped to the same ORM classes, so I could reuse functions operating on the ORM stuff.