Hi All! I am developing Komapper, Kotlin ORM libra...
# server
t
Hi All! I am developing Komapper, Kotlin ORM library for JDBC and R2DBC. English documentation is available from the just released v0.30.0. Please try it out. https://github.com/komapper/komapper
K 13
๐Ÿ‘ 9
๐Ÿ‘๐Ÿผ 1
d
Komapper looks very impressive! I look forward to giving it a spin.
๐Ÿ˜ƒ 1
g
This is really awesome! Is the ability to do dynamic query generation on the roadmap? Say if the models aren't known ahead of time. Type-safety is not possible but at least the query-builder DSL would be very useful as a Kotlin-native alternative to JOOQ.
t
Thank you. Dynamic query generation is supported. See the following documents: https://www.komapper.org/docs/reference/query/querydsl/template/
g
Thank you!
d
Really looks impressive! Is it currently being used in production?
You could probably announce this on #feed , more people will see it. And is there doesn't seem to be a #komapper channel yet?
Also @Toshihiro Nakamura, is there support for KotlinX datetime? And can a Instant be used in definitions?
t
Thanks for your interest and feedback. Komapper is not used in production currently. However, the API will be stable in May 2022. I will release new version in this weekend. After the release, I will announce it on #feed channel. There is no #komapper channel yet, but if many people are interested in Komapper, I will create the channel.
Komapper supports only java.time.LocalDate/LocalTime/LocalDateTime/OffsetDateTime. Can you tell me why KotlinX datetime is needed?
d
Mainly to define the same models for MPP... Komapper only supports JVM, but the models could be reused in JS if kotlinx-datetime were used...
Also, there are some useful functions there for manipulating dates and instants...
t
Thank you for your response. I have created a new issue. https://github.com/komapper/komapper/issues/521
๐Ÿ‘Œ๐Ÿผ 1
@dave08 Komapper v0.31.0 now supports kotlinx-datetime. Try it out.
๐ŸŽ‰ 3
d
Do you think using it in production would be unsafe at this point (if it's use would be properly tested locally...)? Are there any known issues or possible unexpected issues that could come up? I can currently think of a certain microservice we could try it on... but it would have to be reliable @Toshihiro Nakamura.
Also, why is R2DBC support for Mysql and MariaDB N/A in the readme? It seems like there's folders for them in the actual repo?
t
There are no known issues, and Komapper is well tested using Testcontainers. I recommend the JDBC module if reliability is important to you over the R2DBC module. I think that JDBC drivers are more stable than R2DBC ones.
The MariaDB driver does not work as far as I have tried, and the MySQL driver does not yet support R2DBC SPI 0.9.
d
Did you try Jasync's r2dbc implementation? Or is that not the problem? I know there is an existing project that seems to support mysql too: https://github.com/ufoss-org/kotysa ... although that's more like exposed...
So basically, no Mysql for now unless we use JDBC?
t
I didn't try Jasync's R2DBC implementation. However, it does not appear to support R2DBC SPI 0.9. Kotysa supports MySQL R2DBC driver, but the driver does not support R2DBC SPI 0.9. Currently Komapper only supports drivers compatible with R2DBC SPI 0.9.
d
Yeah, it seems like jasync currently supports 0.8.0... we could ask it's developer @oshai if they're planning on supporting 0.9 soon...?
o
I didn't look into that (contrib are always welcome), but if you know what are the differences I can check
d
I personally don't, but maybe @Toshihiro Nakamura does...?
t
The differences between 0.8 and 0.9 are here: https://r2dbc.io/spec/0.9.1.RELEASE/spec/html/#changes.0.9.x
o
at first glance it doesn't looks like many changes. I can give it a try
๐Ÿ‘ 2
123 Views