Hello, If you want to peform the compression / decompression operation already in Java memory, then Converters could be a good choice for you:
- http://www.jooq.org/doc/latest/manual/sql-execution/fetching/data-type-conversion/ - http://www.jooq.org/doc/latest/manual/code-generation/custom-data-types/ Others have already used Converters successfully for encryption, which is almost the same: - https://github.com/jOOQ/jOOQ/issues/3078 Converters would certainly be the easiest solution. If, however, you want to make jOOQ render MySQL's COMPRESS() and UNCOMPRESS() functions transparently for both SQL and CRUD, then you might get more lucky using jOOQ's SQL transformation capabilities: - http://www.jooq.org/doc/latest/manual/sql-building/queryparts/custom-sql-transformation With jOOQ 3.5's TypeProviders, this will become a bit more easy to achieve: - https://github.com/jOOQ/jOOQ/issues/3248 Hope this helps, Lukas 2014-08-28 18:57 GMT+02:00 <thisisafakeemaila...@gmail.com>: > Is there any way to add a function like compress / decompress to the CRUD > functionality in the code generator? > > For example, I would like to emulate > Where id is an int, someData is a Varchar, and someCompressedData is a > BLOB / TEXT on Mysql 5.6. > INSERT id, someData, someCompressedData > INTO myTable > VALUES (1, 'test data', COMPRESS('Some really long data that is better > stored compressed')) > > > Thanks in advance > > -- > 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 jooq-user+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 jooq-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.