You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wrote this plain SQL template in jOOQ's internals:
s = DSL.resultQuery("{0} union all {1}",
select(map(name.fieldNames, n -> inline((Object) null).as(n))).where(falseCondition()),
query
);
The template was necessary because we can't place the query (a ResultQuery typed object) into a Select.unionAll(...) clause. Unfortunately, the formatting is now off:
with
"cte"as (
selectnull"c"where false union allselect1"one"
)
select"cte"."c"from"cte"
It should be:
with
"cte"as (
selectnull"c"where false
union allselect1"one"
)
select"cte"."c"from"cte"
The unformatted version is fine, though:
with "cte"as (selectnull"c"where false union allselect1"one") select"cte"."c"from"cte"
It would be cool if plain SQL templates had special placeholders for the usual Context.formatSeparator() and Context.formatNewline() semantics.
The text was updated successfully, but these errors were encountered:
As a part of this task:
I just wrote this plain SQL template in jOOQ's internals:
The template was necessary because we can't place the
query
(aResultQuery
typed object) into aSelect.unionAll(...)
clause. Unfortunately, the formatting is now off:It should be:
The unformatted version is fine, though:
It would be cool if plain SQL templates had special placeholders for the usual
Context.formatSeparator()
andContext.formatNewline()
semantics.The text was updated successfully, but these errors were encountered: