Hi Ben,
Yes, there is. Consider this page of the manual:
http://www.jooq.org/doc/latest/manual/code-generation/data-type-rewrites/
<forcedType>
<!-- Specify any data type from org.jooq.impl.SQLDataType -->
<name>BOOLEAN</name>
<!-- Add a Java regular expression matching fully-qualified
columns. Use the pipe to separate several expressions.
If provided, both "expressions" and "types" must match. -->
<expression>.*\.IS_VALID</expression>
<!-- Add a Java regular expression matching data types to be
forced to have this type.
Data types may be reported by your database as:
- NUMBER
- NUMBER(5)
- NUMBER(5, 2)
- any other form.
It is thus recommended to use defensive regexes for types.
If provided, both "expressions" and "types" must match. -->
<types>.*</types>
</forcedType>
You will want to omit the <expression> element and provide only a <types>
element. I'm guessing that a good choice might be <types>(?i:BIT)</types>
Cheers
Lukas
2014-06-25 10:49 GMT+02:00 Ben Hood <[email protected]>:
> Hey Lukas,
>
> I was wondering if there is more declarative way of doing this, i.e.
> configuring the generator to map all instances of the MYSQL.BIT type
> to boolean, rather than just on a named column basis.
>
> Cheers,
>
> Ben
>
> On Fri, May 2, 2014 at 10:53 AM, Lukas Eder <[email protected]> wrote:
> > Perfect! Glad it helped,
> >
> > Cheers
> > Lukas
> >
> >
> > 2014-04-30 20:04 GMT+02:00 Salimane Adjao Moustapha <[email protected]
> >:
> >
> >> I went with renderSchema.
> >> Thanks
> >>
> >> --
> >> 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.
> >
> >
> > --
> > 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.
>
> --
> 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.
>
--
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.