diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/ValuesConstructorTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/ValuesConstructorTests.java new file mode 100644 index 0000000000..154026d17e --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/_/testcases/ValuesConstructorTests.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com + * All rights reserved. + * + * This software is licensed to you under the Apache License, Version 2.0 + * (the "License"); You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * . Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * . Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * . Neither the name "jOOQ" nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +package org.jooq.test._.testcases; + +import java.sql.Date; + +import org.jooq.Record1; +import org.jooq.Record2; +import org.jooq.Record3; +import org.jooq.Record6; +import org.jooq.TableRecord; +import org.jooq.UpdatableRecord; +import org.jooq.test.BaseTest; +import org.jooq.test.jOOQAbstractTest; + +import org.junit.Test; + +public class ValuesConstructorTests< + A extends UpdatableRecord & Record6, + AP, + B extends UpdatableRecord, + S extends UpdatableRecord & Record1, + B2S extends UpdatableRecord & Record3, + BS extends UpdatableRecord, + L extends TableRecord & Record2, + X extends TableRecord, + DATE extends UpdatableRecord, + BOOL extends UpdatableRecord, + D extends UpdatableRecord, + T extends UpdatableRecord, + U extends TableRecord, + I extends TableRecord, + IPK extends UpdatableRecord, + T725 extends UpdatableRecord, + T639 extends UpdatableRecord, + T785 extends TableRecord> +extends BaseTest { + + public ValuesConstructorTests(jOOQAbstractTest delegate) { + super(delegate); + } + + @SuppressWarnings("unchecked") + @Test + public void testValuesConstructor() throws Exception { +// Result> r21 = create().selectFrom(values(row(1, "a"))).fetch(); +// +// assertEquals(1, r21.size()); + } +} diff --git a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java index 3b073bcf2c..aed494fc70 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java @@ -127,6 +127,7 @@ import org.jooq.test._.testcases.SchemaAndMappingTests; import org.jooq.test._.testcases.SelectTests; import org.jooq.test._.testcases.StatementTests; import org.jooq.test._.testcases.ThreadSafetyTests; +import org.jooq.test._.testcases.ValuesConstructorTests; import org.jooq.tools.JooqLogger; import org.jooq.tools.StopWatch; import org.jooq.tools.StringUtils; @@ -1447,6 +1448,11 @@ public abstract class jOOQAbstractTest< new SelectTests(this).testComplexUnions(); } + @Test + public void testValuesConstructor() throws Exception { + new ValuesConstructorTests(this).testValuesConstructor(); + } + @Test public void testOrderByInSubquery() throws Exception { new OrderByTests(this).testOrderByInSubquery(); diff --git a/jOOQ-tools/src/org/jooq/xtend/Factory.xtend b/jOOQ-tools/src/org/jooq/xtend/Factory.xtend index 7dc10898cc..c56687c187 100644 --- a/jOOQ-tools/src/org/jooq/xtend/Factory.xtend +++ b/jOOQ-tools/src/org/jooq/xtend/Factory.xtend @@ -49,6 +49,7 @@ class Factory extends Generators { factory.generateSelectDistinct(); factory.generateRowValue(); factory.generateRowField(); + factory.generateValues(); } def generateSelect() { @@ -208,4 +209,43 @@ class Factory extends Generators { insert("org.jooq.impl.Factory", out, "row-field"); } + + def generateValues() { + val out = new StringBuilder(); + + for (degree : (1..Constants::MAX_ROW_DEGREE)) { + out.append(''' + + /** + * Create a VALUES() expression of degree «degree» + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+                 * -- Using VALUES() constructor
+                 * VALUES(«field1_field2_fieldn(degree)»),
+                 *       («field1_field2_fieldn(degree)»),
+                 *       («field1_field2_fieldn(degree)»)
+                 *
+                 * -- Using UNION ALL
+                 * SELECT «field1_field2_fieldn(degree)» UNION ALL
+                 * SELECT «field1_field2_fieldn(degree)» UNION ALL
+                 * SELECT «field1_field2_fieldn(degree)»
+                 * 
+ */ + «generatedMethod» + @Support + static <«TN(degree)»> Table> values(Row«degree»<«TN(degree)»>... rows) { + return new Values>(rows); + } + '''); + } + + insert("org.jooq.impl.Factory", out, "values"); + } } \ No newline at end of file diff --git a/jOOQ-tools/src/org/jooq/xtend/Generators.xtend b/jOOQ-tools/src/org/jooq/xtend/Generators.xtend index 89d59ebe1f..42a9381d40 100644 --- a/jOOQ-tools/src/org/jooq/xtend/Generators.xtend +++ b/jOOQ-tools/src/org/jooq/xtend/Generators.xtend @@ -79,15 +79,19 @@ abstract class Generators { result.append("\n"); result.append(original.substring(original.indexOf(end))); - write(className, result); + write(className, result, section); } - def write(String className, CharSequence contents) { + def write(String className, CharSequence contents) { + write(className, contents, null); + } + + def write(String className, CharSequence contents, String section) { val file = file(className); file.getParentFile().mkdirs(); try { - System::out.println("Generating " + file); + System::out.println("Generating " + file + (if (section != null) (" (section: " + section + ")") else "")); val fw = new FileWriter(file); fw.append(contents); fw.flush(); diff --git a/jOOQ/src/main/java/org/jooq/impl/Factory.java b/jOOQ/src/main/java/org/jooq/impl/Factory.java index 13ac318860..0d42a317a9 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Factory.java +++ b/jOOQ/src/main/java/org/jooq/impl/Factory.java @@ -7510,42 +7510,625 @@ public class Factory { // [#915] TODO: These are experimental VALUES() table constructors // ------------------------------------------------------------------------- +// [jooq-tools] START [values] + /** + * Create a VALUES() expression of degree 1 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1),
+     *       (field1),
+     *       (field1)
+     *
+     * -- Using UNION ALL
+     * SELECT field1 UNION ALL
+     * SELECT field1 UNION ALL
+     * SELECT field1
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row1... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 2 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2),
+     *       (field1, field2),
+     *       (field1, field2)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2 UNION ALL
+     * SELECT field1, field2 UNION ALL
+     * SELECT field1, field2
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row2... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 3 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3),
+     *       (field1, field2, field3),
+     *       (field1, field2, field3)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3 UNION ALL
+     * SELECT field1, field2, field3 UNION ALL
+     * SELECT field1, field2, field3
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row3... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 4 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, field4),
+     *       (field1, field2, field3, field4),
+     *       (field1, field2, field3, field4)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, field4 UNION ALL
+     * SELECT field1, field2, field3, field4 UNION ALL
+     * SELECT field1, field2, field3, field4
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row4... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 5 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, field4, field5),
+     *       (field1, field2, field3, field4, field5),
+     *       (field1, field2, field3, field4, field5)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, field4, field5 UNION ALL
+     * SELECT field1, field2, field3, field4, field5 UNION ALL
+     * SELECT field1, field2, field3, field4, field5
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row5... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 6 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field5, field6),
+     *       (field1, field2, field3, .., field5, field6),
+     *       (field1, field2, field3, .., field5, field6)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field5, field6 UNION ALL
+     * SELECT field1, field2, field3, .., field5, field6 UNION ALL
+     * SELECT field1, field2, field3, .., field5, field6
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row6... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 7 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field6, field7),
+     *       (field1, field2, field3, .., field6, field7),
+     *       (field1, field2, field3, .., field6, field7)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field6, field7 UNION ALL
+     * SELECT field1, field2, field3, .., field6, field7 UNION ALL
+     * SELECT field1, field2, field3, .., field6, field7
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row7... rows) { return new Values>(rows); } + /** + * Create a VALUES() expression of degree 8 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field7, field8),
+     *       (field1, field2, field3, .., field7, field8),
+     *       (field1, field2, field3, .., field7, field8)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field7, field8 UNION ALL
+     * SELECT field1, field2, field3, .., field7, field8 UNION ALL
+     * SELECT field1, field2, field3, .., field7, field8
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support static Table> values(Row8... rows) { return new Values>(rows); } - static Table values(RowN... rows) { - return new Values(rows); + /** + * Create a VALUES() expression of degree 9 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field8, field9),
+     *       (field1, field2, field3, .., field8, field9),
+     *       (field1, field2, field3, .., field8, field9)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field8, field9 UNION ALL
+     * SELECT field1, field2, field3, .., field8, field9 UNION ALL
+     * SELECT field1, field2, field3, .., field8, field9
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row9... rows) { + return new Values>(rows); } + /** + * Create a VALUES() expression of degree 10 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field9, field10),
+     *       (field1, field2, field3, .., field9, field10),
+     *       (field1, field2, field3, .., field9, field10)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field9, field10 UNION ALL
+     * SELECT field1, field2, field3, .., field9, field10 UNION ALL
+     * SELECT field1, field2, field3, .., field9, field10
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row10... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 11 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field10, field11),
+     *       (field1, field2, field3, .., field10, field11),
+     *       (field1, field2, field3, .., field10, field11)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field10, field11 UNION ALL
+     * SELECT field1, field2, field3, .., field10, field11 UNION ALL
+     * SELECT field1, field2, field3, .., field10, field11
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row11... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 12 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field11, field12),
+     *       (field1, field2, field3, .., field11, field12),
+     *       (field1, field2, field3, .., field11, field12)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field11, field12 UNION ALL
+     * SELECT field1, field2, field3, .., field11, field12 UNION ALL
+     * SELECT field1, field2, field3, .., field11, field12
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row12... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 13 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field12, field13),
+     *       (field1, field2, field3, .., field12, field13),
+     *       (field1, field2, field3, .., field12, field13)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field12, field13 UNION ALL
+     * SELECT field1, field2, field3, .., field12, field13 UNION ALL
+     * SELECT field1, field2, field3, .., field12, field13
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row13... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 14 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field13, field14),
+     *       (field1, field2, field3, .., field13, field14),
+     *       (field1, field2, field3, .., field13, field14)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field13, field14 UNION ALL
+     * SELECT field1, field2, field3, .., field13, field14 UNION ALL
+     * SELECT field1, field2, field3, .., field13, field14
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row14... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 15 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field14, field15),
+     *       (field1, field2, field3, .., field14, field15),
+     *       (field1, field2, field3, .., field14, field15)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field14, field15 UNION ALL
+     * SELECT field1, field2, field3, .., field14, field15 UNION ALL
+     * SELECT field1, field2, field3, .., field14, field15
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row15... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 16 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field15, field16),
+     *       (field1, field2, field3, .., field15, field16),
+     *       (field1, field2, field3, .., field15, field16)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field15, field16 UNION ALL
+     * SELECT field1, field2, field3, .., field15, field16 UNION ALL
+     * SELECT field1, field2, field3, .., field15, field16
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row16... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 17 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field16, field17),
+     *       (field1, field2, field3, .., field16, field17),
+     *       (field1, field2, field3, .., field16, field17)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field16, field17 UNION ALL
+     * SELECT field1, field2, field3, .., field16, field17 UNION ALL
+     * SELECT field1, field2, field3, .., field16, field17
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row17... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 18 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field17, field18),
+     *       (field1, field2, field3, .., field17, field18),
+     *       (field1, field2, field3, .., field17, field18)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field17, field18 UNION ALL
+     * SELECT field1, field2, field3, .., field17, field18 UNION ALL
+     * SELECT field1, field2, field3, .., field17, field18
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row18... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 19 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field18, field19),
+     *       (field1, field2, field3, .., field18, field19),
+     *       (field1, field2, field3, .., field18, field19)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field18, field19 UNION ALL
+     * SELECT field1, field2, field3, .., field18, field19 UNION ALL
+     * SELECT field1, field2, field3, .., field18, field19
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row19... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 20 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field19, field20),
+     *       (field1, field2, field3, .., field19, field20),
+     *       (field1, field2, field3, .., field19, field20)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field19, field20 UNION ALL
+     * SELECT field1, field2, field3, .., field19, field20 UNION ALL
+     * SELECT field1, field2, field3, .., field19, field20
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row20... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 21 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field20, field21),
+     *       (field1, field2, field3, .., field20, field21),
+     *       (field1, field2, field3, .., field20, field21)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field20, field21 UNION ALL
+     * SELECT field1, field2, field3, .., field20, field21 UNION ALL
+     * SELECT field1, field2, field3, .., field20, field21
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row21... rows) { + return new Values>(rows); + } + + /** + * Create a VALUES() expression of degree 22 + *

+ * The VALUES() constructor is a tool supported by some + * 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 + * expressions are equivalent: + *

+ *


+     * -- Using VALUES() constructor
+     * VALUES(field1, field2, field3, .., field21, field22),
+     *       (field1, field2, field3, .., field21, field22),
+     *       (field1, field2, field3, .., field21, field22)
+     *
+     * -- Using UNION ALL
+     * SELECT field1, field2, field3, .., field21, field22 UNION ALL
+     * SELECT field1, field2, field3, .., field21, field22 UNION ALL
+     * SELECT field1, field2, field3, .., field21, field22
+     * 
+ */ + @Generated("This method was generated using jOOQ-tools") + @Support + static Table> values(Row22... rows) { + return new Values>(rows); + } + +// [jooq-tools] END [values] + // ------------------------------------------------------------------------- // XXX Literals // -------------------------------------------------------------------------