Join Slack
Hi, I'm using <#C01923PC6A0|kotlinx-datetime> in Spring, how can I write a converter to convert an `...
# spring
t
tvtan
12/17/2020, 10:44 AM
Hi, I'm using
#kotlinx-datetime
in Spring, how can I write a converter to convert an
Instant
or
LocalDateTime
to mysql Datetime and Timestamp?
k
kqr
12/17/2020, 11:25 AM
I would check hibernate types/attribute converters
t
tvtan
12/17/2020, 11:34 AM
I'm using R2DBC but hard to find a document or example how to do it
k
kqr
12/17/2020, 11:49 AM
https://medium.com/@nikola.babic1/mapping-to-json-fields-with-spring-data-r2dbc-and-reactive-postgres-driver-1db765067dc5
?
t
tvtan
12/18/2020, 3:15 AM
Thanks, I'm using the same way but I have to convert kotlin
instant
to java
LocalDateTime
and let r2dbc converts java
LocalDateTime
to mysql datetime or timestamp for me because I'm not sure the convention between java and mysql
6
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by