ufoss-org / kotysa

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

support vertx async sql #82

Closed qiulin closed 2 years ago

qiulin commented 2 years ago

Kotysa is a great tool for spring r2dbc, is there any plan to support vertx async sql ?

pull-vert commented 2 years ago

Hello @qiulin

I didn't know vertx async sql (https://github.com/eclipse-vertx/vertx-sql-client) : it supports some of the DBs Kotysa is also already supporting too.

It seems to be able to return RxJava types, so maybe I could do a new module kotysa-vertx-sql-client (like kotysa-spring-r2dbc), and provide RxJava and Kotlinx coroutines versions. Is it the kind of support you are expecting ?

I can't provide a roadmap for this feature, as I don't know VertX yet.

qiulin commented 2 years ago

@pull-vert Thanks for your reply. Vertx sql client just used another type async db driver like r2dbc, but based on vertx event loop model. Maybe I can make a POC in my free time.

pull-vert commented 2 years ago

@qiulin Thanks for the explaination

Maybe I can make a POC in my free time.

That would be perfect ! Feel free to submit a pull-request, or share a repository for this :+1:

pull-vert commented 2 years ago

A useful guide for Quarkus.

I will add a new module kotysa-vertx-sqlclient with a new VertxSqlClient that will use the Mutiny types Multi and Uni. It will be an extension function on io.vertx.mutiny.sqlclient.Pool

A new sample with reactive Quarkus will show how to use kotysa-vertx-sqlclient

pull-vert commented 2 years ago

@qiulin Vertx async SQL is now supported with kotysa-vertx-sqlclient module with Kotysa release 2.2.0

You can find 2 new samples for Quarkus : JDBC and Vertx async Sqlclient