Hi Christopher,
There are some DSL API elements, which model an "incomplete state". I.e. in
order for them to become a QueryPart, you will have to call a couple of
additional methods. So let's construct this CASE expression:
CASE value WHEN 1 THEN 'one'
WHEN 2 THEN 'two'
ELSE 'three'
END
A "naked" Case type would correspond to the incomplete SQL expression:
CASE ...
END
A "naked" CaseValueStep type would correspond to the incomplete SQL
expression:
CASE value WHEN 1 ...
END
Since these types don't extend QueryPart, Field<?> or any other type, you
will get compilation errors in your client code, if you don't complete the
CASE expression.
Another example of this is the TableOnStep type, which can be obtained by
phrasing the incomplete JOIN expression:
T1 JOIN T2
This expression is invalid, and thus should lead to a compilation error.
Cheers
Lukas
2013/4/5 Christopher Deckers <[email protected]>
> Hi Lukas,
>
> My understanding is that all elements that can compose a query should
> extend QueryPart. Thus, shouldn't these interfaces extend it?
> - Case
> - CaseValueStep
>
> Note that there may be others.
>
> Cheers,
> -Christopher
>
> --
> 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.
>
>
>
--
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.