This is a second question raised while looking at our existing code and
asking how it can be better integrated into jOOQ.
We need to change the DataType conversions for the SQLTypes. For instance
we use BigInteger and BigDecimal for all numeric SQL types, the Joda
classes for all temporal SQL types, etc. This accounts for a fairly large
amount of our custom code AND our ugly custom code.
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. If I understand the design I
can use definitions like
public static final DataType<BigInteger> SMALLINT = new
DefaultDataType<BigInteger>(SQLDialect.POSTGRES, SQLDataType.SMALLINT,
"smallint");
and
public static final DataType<org.joda.time.LocalDate> DATE = new
DefaultDataType<org.joda.time.LocalDate>(SQLDialect.POSTGRES,
SQLDataType.DATE, "date");
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? That might eliminate the need for a fork...
or would we need one anyway for tools.Convert and possibly other classes?
Again I know this is extremely advanced and generally discouraged. I'm only
asking because the alternatives are also pretty painful.
Thanks,
Bear
--
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.