Hi Marcel,

2016-02-03 12:50 GMT+01:00 Marcel Overdijk <[email protected]>:

1. I'm using the static table(..) and field(..) methods. Is this ok as it
> does not go through my DSLContext instance?


Sure. As a general rule of thumb: DSLContext.xxx() methods create DSL
objects in the context of a Configuration, which essentially contains
ConnectionProvider, Settings, SQLDialect, and other SPIs. This is useful
for creating executable statements, not for Field / Table / etc.
expressions.

2. Is there an easier way to construct the order by? Instead of creating
> a SortField<?>[] something like field(..).asc().and().field(..).asc() would
> be useful. Just like building the condition. Maybe this can be done already
> with current api?


Hmm, no... But the artificial keyword appears a bit strange, no? In SQL, a
comma-separated list is used instead.
Of course, you can supply a Collection<? extends SortField<?>> instead of
the array, if that better suits your needs... Most methods that accept
arrays/varargs also accept an equivalent collection argument.

-- 
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.

Reply via email to