java - Issue with jOOQ custom Type conversion -


my application working fine before included custom type converter. need convert jooq uinteger integer, included type converter achieve this. post change, getting mysql syntax error on limit , offset.

then while debugging, found integer values being supplied(including limit , offset values) converting uinteger(because of type converter) , in turn string since uinteger not default type.

i solve solution provided link jooq issue limit , offset want understand details.

  1. if use settings.setstatementtype(statementtype.static_statement) cannot prepared statement , might miss advantages of preparedstatement.

  2. if use factory.inline bind integer inline values, have on complete application , if miss something, result in serious issue.

kindly me out solve issue or give me suggestions on same.

i think you're looking way disable generation of unsigned integer types. relevant code generation flag documented here:

http://www.jooq.org/doc/3.0/manual/code-generation/codegen-advanced

an excerpt:

<!-- generate joou data types unsigned data types,      not natively supported in java.      defaults true --> <unsignedtypes>false</unsignedtypes> 

otherwise, there undocumented solution force types onto sql type rather onto converter. documentation task 1 here:

https://github.com/jooq/jooq/issues/2095

this isn't tested, in case of converting between uinteger , integer might work quite well. example integration tests can seen here

<forcedtype>     <name>uuid</name>     <expressions>(?i:(.*?.)?t_exotic_types.uu)</expressions> </forcedtype> 

in case:

<forcedtype>     <name>integer</name>     <expressions>your_column_matching_expression_here</expressions> </forcedtype> 

note can change database schema hold signed types, instead of unsigned ones.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -