I'm using JSONB for SQL generation, not execution. I need to create queries 
using the PostgreSQL 9.4 JSONB data type, which the jooq DSL doesn't appear 
to support, currently. For example, I need to be able to write expressions 
such as

    cast(stringData, JSONB)

and have it generate SQL of the form

    cast(? as jsonb)

I've got it working the *wrong* way, which is to declare a new constant in 
my project as:

    public static final DataType<Object> JSONB = new 
DefaultDataType<>(POSTGRES_9_4, SQLDataType.OTHER, "jsonb");

but the javadoc for DefaultDataType pretty clearly says I shouldn't do 
that. It's one redemption is that it works. However, I can't seem to figure 
out what the "right" way to do this is. Any pointers?

Regards,
Christopher Currie

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to