goldmansachs/reladomo

Json type Postgres

Closed this issue · 1 comments

If i want to add support for json type postgresql. Where do i need to add this type of support.
It will be represented as string. But when i do an insert in postgres we need to convert string to json. One way is using stringtype=unspecified. But i was wondering if there is a way of intercepting and figuring out the type of the field before preparing the statement.
I was looking at PostgresDatabaseType but i am not sure.

Thanks

There is no JSON type in JDBC. It's simply treated as a String. In your object xml, use javaType="String". If you need to decompose/parse the values, you can do that by adding methods to your concrete class.