com.github.t9t.jooq.json.JsonBinding Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jooq-postgresql-json Show documentation
Show all versions of jooq-postgresql-json Show documentation
jOOQ support for PostgreSQL json & jsonb
package com.github.t9t.jooq.json;
import org.jooq.*;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.sql.Types;
import java.util.Objects;
/**
* jOOQ {@link Binding} to use {@code json} fields as {@link Json}. When selecting fields, the data is returned as
* {@code Json}.
*
* Note that {@code null} values result in a {@code null} object as well, not a {@code Json}
* object with {@code null} value!
*
* When inputting data (eg. on insert and update), the data is sent as text to the
* server, and converted to json there (by adding {@code ::json} to the placeholder).
*
* To use this with the jOOQ code generator, use configuration like this:
* {@code
*
*
* com.github.t9t.jooq.json.Json
* JsonBinding
* json
*
*
* }
*/
public class JsonBinding implements Binding