diff --git a/jOOQ-tools/src/org/jooq/xtend/BetweenAndSteps.xtend b/jOOQ-tools/src/org/jooq/xtend/BetweenAndSteps.xtend
index c8b630adc9..909027c3bb 100644
--- a/jOOQ-tools/src/org/jooq/xtend/BetweenAndSteps.xtend
+++ b/jOOQ-tools/src/org/jooq/xtend/BetweenAndSteps.xtend
@@ -56,8 +56,6 @@ class BetweenAndSteps extends Generators {
«classHeader»
package org.jooq;
- import org.jooq.Support;
-
import javax.annotation.Generated;
/**
@@ -108,7 +106,6 @@ class BetweenAndSteps extends Generators {
package org.jooq.impl;
import static java.util.Arrays.asList;
- import static org.jooq.impl.DSL.row;
import static org.jooq.SQLDialect.ASE;
import static org.jooq.SQLDialect.CUBRID;
import static org.jooq.SQLDialect.DB2;
@@ -120,6 +117,7 @@ class BetweenAndSteps extends Generators {
import static org.jooq.SQLDialect.SQLITE;
import static org.jooq.SQLDialect.SQLSERVER;
import static org.jooq.SQLDialect.SYBASE;
+ import static org.jooq.impl.DSL.row;
import javax.annotation.Generated;
@@ -249,7 +247,7 @@ class BetweenAndSteps extends Generators {
RowN max = (RowN) maxValue;
// These dialects don't support the SYMMETRIC keyword at all
- if (symmetric && asList(ASE, CUBRID, DB2, DERBY, FIREBIRD, H2, MYSQL, ORACLE, SQLITE, SQLSERVER, SYBASE).contains(configuration.getDialect())) {
+ if (symmetric && asList(ASE, CUBRID, DB2, DERBY, FIREBIRD, H2, MYSQL, ORACLE, SQLITE, SQLSERVER, SYBASE).contains(configuration.dialect())) {
if (not) {
return (QueryPartInternal) r.notBetween(min, max).and(r.notBetween(max, min));
}
@@ -260,7 +258,7 @@ class BetweenAndSteps extends Generators {
// These dialects either don't support row value expressions, or they
// Can't handle row value expressions with the BETWEEN predicate
- else if (row.size() > 1 && asList(CUBRID, DERBY, FIREBIRD, MYSQL, ORACLE, SQLITE, SQLSERVER, SYBASE).contains(configuration.getDialect())) {
+ else if (row.size() > 1 && asList(CUBRID, DERBY, FIREBIRD, MYSQL, ORACLE, SQLITE, SQLSERVER, SYBASE).contains(configuration.dialect())) {
Condition result = r.ge(min).and(r.le(max));
if (not) {
diff --git a/jOOQ-tools/src/org/jooq/xtend/DSLContext.xtend b/jOOQ-tools/src/org/jooq/xtend/DSLContext.xtend
index 93b0982c14..477b6c8516 100644
--- a/jOOQ-tools/src/org/jooq/xtend/DSLContext.xtend
+++ b/jOOQ-tools/src/org/jooq/xtend/DSLContext.xtend
@@ -76,7 +76,7 @@ class DSLContext extends Generators {
* statement from this {@link DSLContext}. If you don't need to render or
* execute this SELECT statement (e.g. because you want to
* create a subselect), consider using the static
- * {@link Factory#select(«FOR d : (1..degree) SEPARATOR ', '»Field«ENDFOR»)} instead.
+ * {@link DSL#select(«FOR d : (1..degree) SEPARATOR ', '»Field«ENDFOR»)} instead.
*
* Example:
*
- * @see Factory#selectDistinct(Field...)
+ * @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
«generatedMethod»
@@ -134,7 +134,7 @@ class DSLContext extends Generators {
* statement from this {@link DSLContext}. If you don't need to render or
* execute this
* using(configuration)
@@ -87,7 +87,7 @@ class DSLContext extends Generators {
* .orderBy(field2);
* SELECT statement (e.g. because you want to
* create a subselect), consider using the static
- * {@link Factory#selectDistinct(«FOR d : (1..degree) SEPARATOR ', '»Field«ENDFOR»)} instead.
+ * {@link DSL#selectDistinct(«FOR d : (1..degree) SEPARATOR ', '»Field«ENDFOR»)} instead.
*
* Example:
*
- * @see Factory#selectDistinct(Field...)
+ * @see DSL#selectDistinct(Field...)
* @see #selectDistinct(Field...)
*/
«generatedMethod»
diff --git a/jOOQ-tools/src/org/jooq/xtend/Factory.xtend b/jOOQ-tools/src/org/jooq/xtend/Factory.xtend
deleted file mode 100644
index 8b7f625fb7..0000000000
--- a/jOOQ-tools/src/org/jooq/xtend/Factory.xtend
+++ /dev/null
@@ -1,251 +0,0 @@
-/**
- * Copyright (c) 2009-2013, 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.xtend
-
-import org.jooq.Constants
-
-class Factory extends Generators {
-
- def static void main(String[] args) {
- val factory = new Factory();
- factory.generateSelect();
- factory.generateSelectDistinct();
- factory.generateRowValue();
- factory.generateRowField();
- factory.generateValues();
- }
-
- def generateSelect() {
- val out = new StringBuilder();
-
- for (degree : (1..Constants::MAX_ROW_DEGREE)) {
- var fieldOrRow = "Row" + degree;
-
- if (degree == 1) {
- fieldOrRow = "Field";
- }
-
- out.append('''
-
- /**
- * Create a new DSL subselect statement.
- *
* using(configuration)
@@ -145,7 +145,7 @@ class DSLContext extends Generators {
* .orderBy(field2);
*
- * This is the same as {@link #select(Field...)}, except that it declares - * additional record-level typesafety, which is needed by - * {@link «fieldOrRow»#in(Select)}, {@link «fieldOrRow»#equal(Select)} and other predicate - * building methods taking subselect arguments. - *
- * Unlike {@link Select} factory methods in the {@link DSLContext} API, this
- * creates an unattached, and thus not directly renderable or executable
- * SELECT statement. You can use this statement in two ways:
- *
- * Example:
- * This is the same as {@link #selectDistinct(Field...)}, except that it
- * declares additional record-level typesafety, which is needed by
- * {@link «fieldOrRow»#in(Select)}, {@link «fieldOrRow»#equal(Select)} and other predicate
- * building methods taking subselect arguments.
- *
- * Unlike {@link Select} factory methods in the {@link DSLContext} API, this
- * creates an unattached, and thus not directly renderable or executable
- *
- * Example:
- * Note: Not all databases support row value expressions, but many row value
- * expression operations can be simulated on all databases. See relevant row
- * value expression method Javadocs for details.
- */
- «generatedMethod»
- @Support
- public static <«TN(degree)»> Row«degree»<«TN(degree)»> row(«TN_tn(degree)») {
- return row(«Utils_field_tn(degree)»);
- }
- ''');
- }
-
- insert("org.jooq.impl.Factory", out, "row-value");
- }
-
- def generateRowField() {
- val out = new StringBuilder();
-
- for (degree : (1..Constants::MAX_ROW_DEGREE)) {
- out.append('''
-
- /**
- * Create a row value expression of degree
- * Note: Not all databases support row value expressions, but many row value
- * expression operations can be simulated on all databases. See relevant row
- * value expression method Javadocs for details.
- */
- «generatedMethod»
- @Support
- public static <«TN(degree)»> Row«degree»<«TN(degree)»> row(«Field_TN_tn(degree)») {
- return new RowImpl(«tn(degree)»);
- }
- ''');
- }
-
- 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
- * The
- * If a database doesn't support the
- *
- * Use {@link Table#as(String, String...)} to rename the resulting table and
- * its columns.
- */
- «generatedMethod»
- @Support
- public static <«TN(degree)»> Table
- *
- * @see DSLContext#select(Field...)
- * @see #select(Field...)
- */
- «generatedMethod»
- @Support
- public static <«TN(degree)»> SelectSelectStep
- * import static org.jooq.impl.DSL.*;
- *
- * // [...]
- *
- * select(«field1_field2_fieldn(degree)»)
- * .from(table1)
- * .join(table2).on(field1.equal(field2))
- * .where(field1.greaterThan(100))
- * .orderBy(field2);
- *
SELECT statement. You can use this statement in two ways:
- *
- *
- *
- *
- * @see DSLContext#selectDistinct(Field...)
- * @see #selectDistinct(Field...)
- */
- «generatedMethod»
- @Support
- public static <«TN(degree)»> SelectSelectStep
- * import static org.jooq.impl.DSL.*;
- *
- * // [...]
- *
- * selectDistinct(«field1_field2_fieldn(degree)»)
- * .from(table1)
- * .join(table2).on(field1.equal(field2))
- * .where(field1.greaterThan(100))
- * .orderBy(field2);
- *
«degree».
- * «degree».
- * VALUES() expression of degree «degree».
- * VALUES() constructor is a tool supported by some
- * databases to allow for constructing tables from constant values.
- * VALUES() constructor, it
- * can be simulated using SELECT .. UNION ALL ... The following
- * expressions are equivalent:
- *
- *
- * -- Using VALUES() constructor
- * VALUES(«FOR d : (1..degree) SEPARATOR ', '»val1_«d»«ENDFOR»),
- * («FOR d : (1..degree) SEPARATOR ', '»val2_«d»«ENDFOR»),
- * («FOR d : (1..degree) SEPARATOR ', '»val3_«d»«ENDFOR»)
- * AS "v"(«FOR d : (1..degree) SEPARATOR ', '»"c«d»" «ENDFOR»)
- *
- * -- Using UNION ALL
- * SELECT «FOR d : (1..degree) SEPARATOR ', '»val1_«d» AS "c«d»"«ENDFOR») UNION ALL
- * SELECT «FOR d : (1..degree) SEPARATOR ', '»val1_«d» AS "c«d»"«ENDFOR») UNION ALL
- * SELECT «FOR d : (1..degree) SEPARATOR ', '»val1_«d» AS "c«d»"«ENDFOR»)
- *