Hi Bear, Are you aware of the possibility to apply data type rewriting in the code generator, or to apply converters or data type bindings?
- https://www.jooq.org/doc/latest/manual/code-generation/data-type-rewrites - https://www.jooq.org/doc/latest/manual/code-generation/custom-data-types - https://www.jooq.org/doc/latest/manual/code-generation/custom-data-type-bindings Note that these things can also be applied even if you're not using a code generator. Let me know if you have questions about this. Further comments inline. 2018-03-18 21:01 GMT+01:00 The bear in Boulder <[email protected]>: > I know one possibility is to fork and create new databases like > MY_POSTGRES which is identical to POSTGRES except for the > org.jooq.util.postgres.PostgresDataType class. > That sounds like a lot of work to get it completely right. > That's a bit annoying since we'll want to reuse the rest of the > PostgreSQL-specific code. Could we just overwrite the entries in the > DefaultDataType cache instead? > You could, and it might work for some cases, but I'm not going to recommend, nor endorse it, as I have no idea what the overall effects of such a hack would be. It doesn't sound like a very good idea. Again I know this is extremely advanced > Not so advanced :) jOOQ has had support for custom data type conversion since very early days, and the custom data type binding SPI solves almost every custom data type problem we've encountered on this list so far, by allowing to override how custom types are bound to JDBC. The only missing feature as far as I can tell is to allow for binding a single client data type to a collection of columns (e.g. a range type to 2 columns "from", and "to"). Hope this helps, Lukas -- 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.
