Basically, in my WebFlux application, I have a Spring R2DBC's DatabaseClient
, with which I am trying to insert into a table containing a row typed as tstzrange
.
When trying to insert a String
into this row, I get the following error:
[42804] column "lifetime" is of type tstzrange but expression is of type character varying
client.sql("""
update article
set lifetime = :lifetime
""")
.bind("lifetime", range.toString()))
This seems "normal", but I can not find documentation on how to write my own Parameter
which can encode my String
into a tstzrange
.
Note: inserting using the same
String
without bind parameters works.
Where can I find documentation on how to implement such feature?
Or did someone already write an adapter for tstzrange in Spring's R2DBC DatabaseClient
?