com.github.t9t.jooq.json.JsonbStringBinding 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 jsonb} fields as {@code String}. When selecting fields, the data
* is returned as {@code String}. 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 ::jsonb} to the placeholder).
*
*
* To use this with the jOOQ code generator, use configuration like this:
*
* {@code
*
*
* java.lang.String
* JsonbStringBinding
* jsonb
*
*
* }
*
* @see JsonStringBinding
*/
public class JsonbStringBinding implements Binding