From 97fd143471fc2a872792e13d1aa724d032ea59c5 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 6 Jan 2015 15:22:12 +0100 Subject: [PATCH] [#3886] Add Field> DSL.field(Row[N]) to allow for nesting rows in SELECT clauses --- .../main/java/org/jooq/impl/CursorImpl.java | 52 ++-- jOOQ/src/main/java/org/jooq/impl/DSL.java | 264 +++++++++--------- .../java/org/jooq/impl/DefaultBinding.java | 1 - .../java/org/jooq/impl/QueryPartList.java | 11 +- .../java/org/jooq/impl/RecordDelegate.java | 2 +- .../src/main/java/org/jooq/impl/RowField.java | 47 +++- jOOQ/src/main/java/org/jooq/impl/Utils.java | 53 ++-- 7 files changed, 249 insertions(+), 181 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/CursorImpl.java b/jOOQ/src/main/java/org/jooq/impl/CursorImpl.java index 53c818e223..f5bdfa68b6 100644 --- a/jOOQ/src/main/java/org/jooq/impl/CursorImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/CursorImpl.java @@ -94,7 +94,7 @@ class CursorImpl implements Cursor { private final ExecuteContext ctx; private final ExecuteListener listener; - private final Field[] fields; + private final Field[] cursorFields; private final boolean[] intern; private final boolean keepResultSet; private final boolean keepStatement; @@ -113,7 +113,7 @@ class CursorImpl implements Cursor { CursorImpl(ExecuteContext ctx, ExecuteListener listener, Field[] fields, int[] internIndexes, boolean keepStatement, boolean keepResultSet, Class type) { this.ctx = ctx; this.listener = (listener != null ? listener : new ExecuteListeners(ctx)); - this.fields = fields; + this.cursorFields = fields; this.factory = recordFactory(type, fields); this.keepStatement = keepStatement; this.keepResultSet = keepResultSet; @@ -130,13 +130,13 @@ class CursorImpl implements Cursor { @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public final RecordType recordType() { - return new RowImpl(fields).fields; + return new RowImpl(cursorFields).fields; } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public final Row fieldsRow() { - return new RowImpl(fields); + return new RowImpl(cursorFields); } @Override @@ -151,12 +151,12 @@ class CursorImpl implements Cursor { @Override public final Field field(int index) { - return index >= 0 && index < fields.length ? fields[index] : null; + return index >= 0 && index < cursorFields.length ? cursorFields[index] : null; } @Override public final Field[] fields() { - return fields.clone(); + return cursorFields.clone(); } @Override @@ -196,7 +196,7 @@ class CursorImpl implements Cursor { // Before listener.resultStart(ctx) iterator(); - ResultImpl result = new ResultImpl(ctx.configuration(), fields); + ResultImpl result = new ResultImpl(ctx.configuration(), cursorFields); ctx.result(result); listener.resultStart(ctx); @@ -1371,11 +1371,6 @@ class CursorImpl implements Cursor { */ private Boolean hasNext; - /** - * A delegate runnable that handles record initialisation. - */ - private final CursorRecordInitialiser initialiser = new CursorRecordInitialiser(); - @Override public final boolean hasNext() { if (hasNext == null) { @@ -1412,7 +1407,7 @@ class CursorImpl implements Cursor { } record = Utils.newRecord(true, (RecordFactory) factory, ctx.configuration()) - .operate(initialiser); + .operate(new CursorRecordInitialiser(cursorFields, 0)); rows++; } @@ -1450,13 +1445,21 @@ class CursorImpl implements Cursor { private class CursorRecordInitialiser implements RecordOperation { + private final Field[] initaliserFields; + private int offset; + + CursorRecordInitialiser(Field[] fields, int offset) { + this.initaliserFields = fields; + this.offset = offset; + } + @Override public AbstractRecord operate(AbstractRecord record) throws SQLException { ctx.record(record); listener.recordStart(ctx); - for (int i = 0; i < fields.length; i++) { - setValue(record, fields[i], i); + for (int i = 0; i < initaliserFields.length; i++) { + setValue(record, initaliserFields[i], i); if (intern[i]) { record.intern0(i); @@ -1472,10 +1475,23 @@ class CursorImpl implements Cursor { /** * Utility method to prevent unnecessary unchecked conversions */ + @SuppressWarnings("unchecked") private final void setValue(AbstractRecord record, Field field, int index) throws SQLException { - DefaultBindingGetResultSetContext out = new DefaultBindingGetResultSetContext(ctx.configuration(), ctx.resultSet(), index + 1); - field.getBinding().get(out); - T value = out.value(); + T value; + + if (field instanceof RowField) { + Field[] emulatedFields = ((RowField) field).emulatedFields(); + + value = (T) Utils.newRecord(true, RecordImpl.class, emulatedFields, ctx.configuration()) + .operate(new CursorRecordInitialiser(emulatedFields, offset + index)); + + offset += emulatedFields.length - 1; + } + else { + DefaultBindingGetResultSetContext out = new DefaultBindingGetResultSetContext(ctx.configuration(), ctx.resultSet(), offset + index + 1); + field.getBinding().get(out); + value = out.value(); + } record.values[index] = value; record.originals[index] = value; diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java index 483de7d85b..882d72612f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DSL.java +++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java @@ -6558,287 +6558,287 @@ public class DSL { * Turn a row value expression of degree 1 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row1 row) { return new RowField, Record1>(row); - } + } /** * Turn a row value expression of degree 2 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row2 row) { return new RowField, Record2>(row); - } + } /** * Turn a row value expression of degree 3 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row3 row) { return new RowField, Record3>(row); - } + } /** * Turn a row value expression of degree 4 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row4 row) { return new RowField, Record4>(row); - } + } /** * Turn a row value expression of degree 5 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row5 row) { return new RowField, Record5>(row); - } + } /** * Turn a row value expression of degree 6 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row6 row) { return new RowField, Record6>(row); - } + } /** * Turn a row value expression of degree 7 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row7 row) { return new RowField, Record7>(row); - } + } /** * Turn a row value expression of degree 8 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row8 row) { return new RowField, Record8>(row); - } + } /** * Turn a row value expression of degree 9 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row9 row) { return new RowField, Record9>(row); - } + } /** * Turn a row value expression of degree 10 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row10 row) { return new RowField, Record10>(row); - } + } /** * Turn a row value expression of degree 11 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row11 row) { return new RowField, Record11>(row); - } + } /** * Turn a row value expression of degree 12 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row12 row) { return new RowField, Record12>(row); - } + } /** * Turn a row value expression of degree 13 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row13 row) { return new RowField, Record13>(row); - } + } /** * Turn a row value expression of degree 14 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row14 row) { return new RowField, Record14>(row); - } + } /** * Turn a row value expression of degree 15 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row15 row) { return new RowField, Record15>(row); - } + } /** * Turn a row value expression of degree 16 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row16 row) { return new RowField, Record16>(row); - } + } /** * Turn a row value expression of degree 17 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row17 row) { return new RowField, Record17>(row); - } + } /** * Turn a row value expression of degree 18 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row18 row) { return new RowField, Record18>(row); - } + } /** * Turn a row value expression of degree 19 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row19 row) { return new RowField, Record19>(row); - } + } /** * Turn a row value expression of degree 20 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row20 row) { return new RowField, Record20>(row); - } + } /** * Turn a row value expression of degree 21 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row21 row) { return new RowField, Record21>(row); - } + } /** * Turn a row value expression of degree 22 into a {@code Field}. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") - @Support({ POSTGRES }) + @Support public static Field> field(Row22 row) { return new RowField, Record22>(row); - } + } // [jooq-tools] END [row-field] @@ -11515,7 +11515,7 @@ public class DSL { * Create a row value expression of degree 1. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11528,7 +11528,7 @@ public class DSL { * Create a row value expression of degree 2. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11541,7 +11541,7 @@ public class DSL { * Create a row value expression of degree 3. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11554,7 +11554,7 @@ public class DSL { * Create a row value expression of degree 4. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11567,7 +11567,7 @@ public class DSL { * Create a row value expression of degree 5. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11580,7 +11580,7 @@ public class DSL { * Create a row value expression of degree 6. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11593,7 +11593,7 @@ public class DSL { * Create a row value expression of degree 7. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11606,7 +11606,7 @@ public class DSL { * Create a row value expression of degree 8. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11619,7 +11619,7 @@ public class DSL { * Create a row value expression of degree 9. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11632,7 +11632,7 @@ public class DSL { * Create a row value expression of degree 10. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11645,7 +11645,7 @@ public class DSL { * Create a row value expression of degree 11. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11658,7 +11658,7 @@ public class DSL { * Create a row value expression of degree 12. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11671,7 +11671,7 @@ public class DSL { * Create a row value expression of degree 13. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11684,7 +11684,7 @@ public class DSL { * Create a row value expression of degree 14. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11697,7 +11697,7 @@ public class DSL { * Create a row value expression of degree 15. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11710,7 +11710,7 @@ public class DSL { * Create a row value expression of degree 16. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11723,7 +11723,7 @@ public class DSL { * Create a row value expression of degree 17. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11736,7 +11736,7 @@ public class DSL { * Create a row value expression of degree 18. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11749,7 +11749,7 @@ public class DSL { * Create a row value expression of degree 19. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11762,7 +11762,7 @@ public class DSL { * Create a row value expression of degree 20. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11775,7 +11775,7 @@ public class DSL { * Create a row value expression of degree 21. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11788,7 +11788,7 @@ public class DSL { * Create a row value expression of degree 22. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11817,7 +11817,7 @@ public class DSL { * Create a row value expression of degree 1. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11830,7 +11830,7 @@ public class DSL { * Create a row value expression of degree 2. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11843,7 +11843,7 @@ public class DSL { * Create a row value expression of degree 3. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11856,7 +11856,7 @@ public class DSL { * Create a row value expression of degree 4. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11869,7 +11869,7 @@ public class DSL { * Create a row value expression of degree 5. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11882,7 +11882,7 @@ public class DSL { * Create a row value expression of degree 6. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11895,7 +11895,7 @@ public class DSL { * Create a row value expression of degree 7. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11908,7 +11908,7 @@ public class DSL { * Create a row value expression of degree 8. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11921,7 +11921,7 @@ public class DSL { * Create a row value expression of degree 9. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11934,7 +11934,7 @@ public class DSL { * Create a row value expression of degree 10. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11947,7 +11947,7 @@ public class DSL { * Create a row value expression of degree 11. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11960,7 +11960,7 @@ public class DSL { * Create a row value expression of degree 12. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11973,7 +11973,7 @@ public class DSL { * Create a row value expression of degree 13. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11986,7 +11986,7 @@ public class DSL { * Create a row value expression of degree 14. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -11999,7 +11999,7 @@ public class DSL { * Create a row value expression of degree 15. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12012,7 +12012,7 @@ public class DSL { * Create a row value expression of degree 16. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12025,7 +12025,7 @@ public class DSL { * Create a row value expression of degree 17. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12038,7 +12038,7 @@ public class DSL { * Create a row value expression of degree 18. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12051,7 +12051,7 @@ public class DSL { * Create a row value expression of degree 19. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12064,7 +12064,7 @@ public class DSL { * Create a row value expression of degree 20. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12077,7 +12077,7 @@ public class DSL { * Create a row value expression of degree 21. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12090,7 +12090,7 @@ public class DSL { * Create a row value expression of degree 22. *

* Note: Not all databases support row value expressions, but many row value - * expression operations can be simulated on all databases. See relevant row + * expression operations can be emulated on all databases. See relevant row * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @@ -12182,7 +12182,7 @@ public class DSL { * databases to allow for constructing tables from constant values. *

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12214,7 +12214,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12246,7 +12246,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12278,7 +12278,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12310,7 +12310,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12342,7 +12342,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12374,7 +12374,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12406,7 +12406,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12438,7 +12438,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12470,7 +12470,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12502,7 +12502,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12534,7 +12534,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12566,7 +12566,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12598,7 +12598,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12630,7 +12630,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12662,7 +12662,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12694,7 +12694,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12726,7 +12726,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12758,7 +12758,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12790,7 +12790,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12822,7 +12822,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


@@ -12854,7 +12854,7 @@ public class DSL {
      * databases to allow for constructing tables from constant values.
      * 

* If a database doesn't support the VALUES() constructor, it - * can be simulated using SELECT .. UNION ALL ... The following + * can be emulated using SELECT .. UNION ALL ... The following * expressions are equivalent: *

*


diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java b/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java
index 80035bcfc6..1f29cc3ac1 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DefaultBinding.java
@@ -1414,7 +1414,6 @@ public class DefaultBinding implements Binding {
                     result = (T) ctx.resultSet().getObject(ctx.index(), DataTypes.udtRecords());
                     break;
             }
-
         }
         else if (Result.class.isAssignableFrom(type)) {
             ResultSet nested = (ResultSet) ctx.resultSet().getObject(ctx.index());
diff --git a/jOOQ/src/main/java/org/jooq/impl/QueryPartList.java b/jOOQ/src/main/java/org/jooq/impl/QueryPartList.java
index 7a584daa25..bed6fc72d6 100644
--- a/jOOQ/src/main/java/org/jooq/impl/QueryPartList.java
+++ b/jOOQ/src/main/java/org/jooq/impl/QueryPartList.java
@@ -42,6 +42,7 @@
 package org.jooq.impl;
 
 import static java.util.Arrays.asList;
+import static org.jooq.impl.Utils.DATA_LIST_ALREADY_INDENTED;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -91,20 +92,20 @@ class QueryPartList extends AbstractQueryPart implements Li
             String separator = "";
             boolean indent = (size() > 1);
 
-            if (indent)
+            if (indent && ctx.data(DATA_LIST_ALREADY_INDENTED) == null)
                 ctx.formatIndentStart();
 
-            for (T queryPart : this) {
+            for (int i = 0; i < size(); i++) {
                 ctx.sql(separator);
 
-                if (indent)
+                if (i > 0 || ctx.data(DATA_LIST_ALREADY_INDENTED) == null)
                     ctx.formatNewLine();
 
-                ctx.visit(queryPart);
+                ctx.visit(get(i));
                 separator = ", ";
             }
 
-            if (indent)
+            if (indent && ctx.data(DATA_LIST_ALREADY_INDENTED) == null)
                 ctx.formatIndentEnd();
         }
     }
diff --git a/jOOQ/src/main/java/org/jooq/impl/RecordDelegate.java b/jOOQ/src/main/java/org/jooq/impl/RecordDelegate.java
index 996e063bc4..e2f1b31d2b 100644
--- a/jOOQ/src/main/java/org/jooq/impl/RecordDelegate.java
+++ b/jOOQ/src/main/java/org/jooq/impl/RecordDelegate.java
@@ -84,7 +84,7 @@ class RecordDelegate {
     }
 
     @SuppressWarnings("unchecked")
-    final  R operate(RecordOperation operation) throws E {
+    final  R operate(RecordOperation operation) throws E {
         RecordListenerProvider[] providers = null;
         RecordListener[] listeners = null;
         DefaultRecordContext ctx = null;
diff --git a/jOOQ/src/main/java/org/jooq/impl/RowField.java b/jOOQ/src/main/java/org/jooq/impl/RowField.java
index 386961aaaf..58f7612741 100644
--- a/jOOQ/src/main/java/org/jooq/impl/RowField.java
+++ b/jOOQ/src/main/java/org/jooq/impl/RowField.java
@@ -40,31 +40,68 @@
  */
 package org.jooq.impl;
 
+import static org.jooq.impl.Utils.DATA_LIST_ALREADY_INDENTED;
+
 import org.jooq.Context;
 import org.jooq.DataType;
+import org.jooq.Field;
 import org.jooq.Record;
 import org.jooq.Row;
 
 /**
  * @author Lukas Eder
  */
-class RowField extends AbstractField {
+class RowField extends AbstractField {
 
     /**
      * Generated UID
      */
     private static final long serialVersionUID = -2065258332642911588L;
 
-    private final R1          row;
+    private final ROW         row;
+    private final String      as;
+    private final Field[]  emulatedFields;
 
-    RowField(R1 row) {
-        super("row", (DataType) SQLDataType.RECORD);
+    RowField(ROW row) {
+        this(row, "row");
+    }
+
+    RowField(ROW row, String as) {
+        super(as, (DataType) SQLDataType.RECORD);
 
         this.row = row;
+        this.as = as;
+        this.emulatedFields = new Field[row.fields().length];
+
+        for (int i = 0; i < emulatedFields.length; i++)
+            emulatedFields[i] = row.field(i).as(as + "." + row.field(i).getName());
+    }
+
+    Field[] emulatedFields() {
+        return emulatedFields;
     }
 
     @Override
     public final void accept(Context ctx) {
-        ctx.visit(row);
+        if (ctx.declareFields()) {
+            Object previous = ctx.data(DATA_LIST_ALREADY_INDENTED);
+
+            ctx.data(DATA_LIST_ALREADY_INDENTED, true);
+            ctx.visit(new SelectFieldList(emulatedFields()));
+            ctx.data(DATA_LIST_ALREADY_INDENTED, previous);
+        }
+        else {
+            ctx.visit(row);
+        }
+    }
+
+    @Override
+    public Field as(String alias) {
+        return new RowField(row, alias);
+    }
+
+    @Override
+    public boolean declaresFields() {
+        return true;
     }
 }
diff --git a/jOOQ/src/main/java/org/jooq/impl/Utils.java b/jOOQ/src/main/java/org/jooq/impl/Utils.java
index 3650ed844e..d303059d3a 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Utils.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Utils.java
@@ -140,7 +140,7 @@ import org.jooq.tools.reflect.Reflect;
  */
 final class Utils {
 
-    static final JooqLogger      log                                          = JooqLogger.getLogger(Utils.class);
+    static final JooqLogger       log                                          = JooqLogger.getLogger(Utils.class);
 
     // ------------------------------------------------------------------------
     // Some constants for use with Context.data()
@@ -151,7 +151,7 @@ final class Utils {
      * clause in {@link DSLContext#batchStore(UpdatableRecord...)} calls for
      * {@link SQLDialect#POSTGRES}.
      */
-    static final String          DATA_OMIT_RETURNING_CLAUSE                   = "org.jooq.configuration.omit-returning-clause";
+    static final String           DATA_OMIT_RETURNING_CLAUSE                   = "org.jooq.configuration.omit-returning-clause";
 
     /**
      * [#1905] This constant is used internally by jOOQ to indicate to
@@ -161,20 +161,20 @@ final class Utils {
      * This is particularly useful for H2, which pretends that ARRAYs and RVEs
      * are the same
      */
-    static final String          DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY = "org.jooq.configuration.row-value-expression-subquery";
+    static final String           DATA_ROW_VALUE_EXPRESSION_PREDICATE_SUBQUERY = "org.jooq.configuration.row-value-expression-subquery";
 
     /**
      * [#1296] This constant is used internally by jOOQ to indicate that
      * {@link ResultSet} rows must be locked to simulate a
      * FOR UPDATE clause.
      */
-    static final String          DATA_LOCK_ROWS_FOR_UPDATE                    = "org.jooq.configuration.lock-rows-for-update";
+    static final String           DATA_LOCK_ROWS_FOR_UPDATE                    = "org.jooq.configuration.lock-rows-for-update";
 
     /**
      * [#1520] Count the number of bind values, and potentially enforce a static
      * statement.
      */
-    static final String          DATA_COUNT_BIND_VALUES                       = "org.jooq.configuration.count-bind-values";
+    static final String           DATA_COUNT_BIND_VALUES                       = "org.jooq.configuration.count-bind-values";
 
     /**
      * [#1520] Enforce executing static statements.
@@ -189,7 +189,7 @@ final class Utils {
      * 
  • {@link SQLDialect#SQLSERVER} : 2100
  • * */ - static final String DATA_FORCE_STATIC_STATEMENT = "org.jooq.configuration.force-static-statement"; + static final String DATA_FORCE_STATIC_STATEMENT = "org.jooq.configuration.force-static-statement"; /** * [#2665] Omit the emission of clause events by {@link QueryPart}s. @@ -199,7 +199,7 @@ final class Utils { * {@link Clause#FIELD_REFERENCE} may contain a * {@link Clause#TABLE_REFERENCE}. */ - static final String DATA_OMIT_CLAUSE_EVENT_EMISSION = "org.jooq.configuration.omit-clause-event-emission"; + static final String DATA_OMIT_CLAUSE_EVENT_EMISSION = "org.jooq.configuration.omit-clause-event-emission"; /** * [#2665] Wrap derived tables in parentheses. @@ -210,7 +210,7 @@ final class Utils { * practice should no longer be pursued, as such "sub-renderers" will emit / * divert {@link Clause} events. */ - static final String DATA_WRAP_DERIVED_TABLES_IN_PARENTHESES = "org.jooq.configuration.wrap-derived-tables-in-parentheses"; + static final String DATA_WRAP_DERIVED_TABLES_IN_PARENTHESES = "org.jooq.configuration.wrap-derived-tables-in-parentheses"; /** * [#2790] A locally scoped data map. @@ -220,7 +220,7 @@ final class Utils { * when communicating between SELECT and WINDOW clauses, as is required to * emulate #531. */ - static final String DATA_LOCALLY_SCOPED_DATA_MAP = "org.jooq.configuration.locally-scoped-data-map"; + static final String DATA_LOCALLY_SCOPED_DATA_MAP = "org.jooq.configuration.locally-scoped-data-map"; /** * [#531] The local window definitions. @@ -229,7 +229,7 @@ final class Utils { * needed in the SELECT clause when emulating them by inlining * window specifications. */ - static final String DATA_WINDOW_DEFINITIONS = "org.jooq.configuration.local-window-definitions"; + static final String DATA_WINDOW_DEFINITIONS = "org.jooq.configuration.local-window-definitions"; /* [pro] xx xxx @@ -238,26 +238,26 @@ final class Utils { x xx xxxx x xxxxxxxxxxx xxxxx xxxxxxx xxxxxxxxxxx xxxxxx xxxxxxx xxxxx x xxxxxxxxxxx xx xxx xxxxxxxxxx xxxxxxxxxxxx xx xxxxxxxxxxxxxxxx xxxxxxx xx - xxxxxx xxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + xxxxxx xxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx [/pro] */ /** * [#1629] The {@link Connection#getAutoCommit()} flag value before starting * a new transaction. */ - static final String DATA_DEFAULT_TRANSACTION_PROVIDER_AUTOCOMMIT = "org.jooq.configuration.default-transaction-provider-autocommit"; + static final String DATA_DEFAULT_TRANSACTION_PROVIDER_AUTOCOMMIT = "org.jooq.configuration.default-transaction-provider-autocommit"; /** * [#1629] The {@link Connection#getAutoCommit()} flag value before starting * a new transaction. */ - static final String DATA_DEFAULT_TRANSACTION_PROVIDER_SAVEPOINTS = "org.jooq.configuration.default-transaction-provider-savepoints"; + static final String DATA_DEFAULT_TRANSACTION_PROVIDER_SAVEPOINTS = "org.jooq.configuration.default-transaction-provider-savepoints"; /** * [#1629] The {@link DefaultConnectionProvider} instance to be used during * the transaction. */ - static final String DATA_DEFAULT_TRANSACTION_PROVIDER_CONNECTION = "org.jooq.configuration.default-transaction-provider-connection-provider"; + static final String DATA_DEFAULT_TRANSACTION_PROVIDER_CONNECTION = "org.jooq.configuration.default-transaction-provider-connection-provider"; /** * [#2080] When emulating OFFSET pagination in certain databases, synthetic @@ -265,7 +265,7 @@ final class Utils { * ORDER BY clauses, in lieu of their corresponding original * aliases. */ - static final String DATA_OVERRIDE_ALIASES_IN_ORDER_BY = "org.jooq.configuration.override-aliases-in-order-by"; + static final String DATA_OVERRIDE_ALIASES_IN_ORDER_BY = "org.jooq.configuration.override-aliases-in-order-by"; /** * [#2080] When emulating OFFSET pagination in certain databases, synthetic @@ -273,22 +273,27 @@ final class Utils { * ORDER BY clauses, in lieu of their corresponding original * aliases. */ - static final String DATA_UNALIAS_ALIASES_IN_ORDER_BY = "org.jooq.configuration.unalias-aliases-in-order-by"; + static final String DATA_UNALIAS_ALIASES_IN_ORDER_BY = "org.jooq.configuration.unalias-aliases-in-order-by"; /** * [#3381] The table to be used for the {@link Clause#SELECT_INTO} clause. */ - static final String DATA_SELECT_INTO_TABLE = "org.jooq.configuration.select-into-table"; + static final String DATA_SELECT_INTO_TABLE = "org.jooq.configuration.select-into-table"; /** * [#3381] Omit the {@link Clause#SELECT_INTO}, as it is being emulated. */ - static final String DATA_OMIT_INTO_CLAUSE = "org.jooq.configuration.omit-into-clause"; + static final String DATA_OMIT_INTO_CLAUSE = "org.jooq.configuration.omit-into-clause"; /** * [#1658] Specify whether the trailing LIMIT clause needs to be rendered. */ - static final String DATA_RENDER_TRAILING_LIMIT_IF_APPLICABLE = "org.jooq.configuration.render-trailing-limit-if-applicable"; + static final String DATA_RENDER_TRAILING_LIMIT_IF_APPLICABLE = "org.jooq.configuration.render-trailing-limit-if-applicable"; + + /** + * [#3886] Whether a list has already been indented. + */ + static final String DATA_LIST_ALREADY_INDENTED = "org.jooq.configuration.list-already-indented"; /** * [#2965] These are {@link ConcurrentHashMap}s containing caches for @@ -1876,6 +1881,16 @@ final class Utils { V guarded(); } + /** + * A default implementation for {@link GuardedOperation#guarded()}. + */ + abstract static class AbstractGuardedOperation implements GuardedOperation { + @Override + public V guarded() { + return null; + } + } + /** * Run an operation using a guard. */