You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we are using MariaDB as database and I would like to store a Circe json in the database.
In the documentation I saw that for Postgres you can use the following code for a bidirectional mapping:
implicit val jsonMeta: Meta[Json] =
Meta.Advanced.other[PGobject]("json").timap[Json](
a => parse(a.getValue).leftMap[Json](e => throw e).merge)(
a => {
val o = new PGobject
o.setType("json")
o.setValue(a.noSpaces)
o
}
)
Since I don't have PGObject with MariaDB, how else could I do this mapping ?
Thanks a lot
The text was updated successfully, but these errors were encountered:
@jmw847 PGobject is PostgreSQL JDBC driver's way of allowing you to set the value of a custom type (in this case the custom type is JSON). You'd need to find the equivalent way to do that in MariaDB's JDBC driver. (Sorry I spent a few min looking but didn't find anything)
Hello all,
we are using MariaDB as database and I would like to store a Circe json in the database.
In the documentation I saw that for Postgres you can use the following code for a bidirectional mapping:
Since I don't have PGObject with MariaDB, how else could I do this mapping ?
Thanks a lot
The text was updated successfully, but these errors were encountered: