ufoss-org / kotysa

The idiomatic way to write type-safe SQL in Kotlin
The Unlicense
121 stars 2 forks source link

Question: Can library this be used w/o spring dependencies? #59

Closed dave08 closed 3 years ago

dave08 commented 3 years ago

We want to use it in Micronaut or Ktor... but in the docs it seems like it's only for Android and Spring... pulling in tons of extra dependencies for a db layer wouldn't be too nice, especially since in Micronaut, a big stress on AOP and not using runtime reflection is made, whereas in Spring AFAIK, not...

pull-vert commented 3 years ago

You are correct, for now Kotysa is only available for spring-jdbc, spring-r2dbc and android.

I think your issue will be resolved by the soon to come 1.1.2 Kotysa release that will include a new kotysa-jdbc module (issue #15) without any additional dependency).

I will then add Ktor or/and Micronaut samples to provide examples of how to use Kotysa with these tools.

dave08 commented 3 years ago

What about R2DBC and the non-blocking api? That issue specifies that it will only cover the blocking api (and both Ktor and Micronaut support suspend functions...).

pull-vert commented 3 years ago

I must start with something, first new module will be kotysa-jdbc, as it is most widely used today than r2dbc.

But making a kotysa-r2dbc without any depency other than r2dbc is a good idea ! I just created issue #61 , that will come in a later release

pull-vert commented 3 years ago

Kotysa 1.1.2 is just released, @dave08 you can try kotysa-jdbc module, and see the new ktor sample that show how to use it

dave08 commented 3 years ago

Nice :+1: , thanks!