Hi Lukas,
I wanted to understand the result of Executor.selectXX(XX). I found this
hierarchy:
QueryPart
Query
ResultQuery<R extends Record>
Select<R extends Record>
SelectFinalStep<R extends Record>
SelectForUpdateStep<R extends Record>
SelectLimitStep<R extends Record>
SelectOrderByStep<R extends Record>
SelectHavingStep<R extends Record>
SelectGroupByStep<R extends Record>
SelectConnectByStep<R extends Record>
SelectWhereStep<R extends Record>
SelectFromStep<R extends Record>
SelectSelectStep<R extends Record>
I may be mistaken, so correct me if I am wrong, but I have the feeling that
intermediate types between SelectSelectStep and ResultQuery are
capabilities. If this is so, then the hierarchy should be:
QueryPart
Query
ResultQuery<R extends Record>
SelectSelectStep<R extends Record>
with:
SelectSelectStep extends ISelect, IFinal, IForUpdate, ILimit, IOrderBy,
IHaving, IGroupBy, IConnectBy, IWhere, IFrom
These interfaces would not extend any particular hierarchy. The "I"Naming
is so you get the idea of what I am trying to say.
In fact, I don't think these intermediate "steps" are meaningful to users,
and they are not exposed in the Executor API, so "SelectSelectStep" should
just be renamed to "Select" (or ISelect, QuerySelect, etc.) and the
internal one have a different name. This would result in a flat hierarchy
where types have capabilities, easy to navigate and comprehend. A signature
that reads "QuerySelect select()" looks cleaner than "SelectSelectStep
select()" where to know what SelectSelectStep means we have to go through a
14-level hierarchy of Javadoc with no apparent logic as to why one inherits
another.
Eventually, SelectImpl would implement Select, instead of SelectSelectStep.
Going further, flatening all of these would result in the type hierarchy of
QueryPart to be an effective way to understand jOOQ types (for now, hitting
F4 on QueryPart in Eclipse results in a mind boggling structure).
Please let me know what you think!
-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.