2013/6/25 Durchholz, Joachim <[email protected]>
> > So, you think that an API union of strict APIs
> > is useful? Or did you mean an API intersection
> > (removing features that aren't available in *both*
> > databases)?
>
> My wishlist item for this would be:
>
> The intersection of exactly those dialects I care about, plus anything
> that can be emulated without resorting to potentially surprising behaviour.
>
Yes. Pick MySQL+Oracle dialects (for instance), choose "transformative"
strictness, choose API intersection (not union, in this case), generate.
> I'm not sure how to organize this, much less implement it; it's definitely
> an architectural challenge to cleanly cater for all 2^N subsets of N
> supported dialects, brute-force solutions won't work for that.
>
Should be easy. All relevant methods are already annotated with @Support({
dialect1, dialect2 }). With API intersection, both MySQL+Oracle must be
contained in a method's @Support for the method to make it into the API.
With API union, one of MySQL, Oracle must be contained.
@Support currently only documents "transformative" strictness. It will be
enhanced to distinguish between 3 strictness levels:
https://github.com/jOOQ/jOOQ/issues/2409
> Maybe it's enough to offer diagnostics. Say, whenever Jooq is configured
> for dialect, it accepts the dialect to use, and the set of dialects to
> restrict its API to. That way, Jooq can emit diagnostics if the application
> tries things that happen to work with the currently selected dialect but
> wouldn't for other dialects that the application is supposed to be
> compatible with.
>
The plans being discussed here will allow for very precise compile-time
checking of whether a clause / expression is supported by a set of dialects
(except when choosing API union). There is no way to "try things" that will
not work, unless I'm misunderstanding something?
--
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/groups/opt_out.