All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jooq.impl.DSL Maven / Gradle / Ivy

There is a newer version: 0.10.0
Show newest version
/**
 * Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com)
 * All rights reserved.
 *
 * This work is dual-licensed
 * - under the Apache Software License 2.0 (the "ASL")
 * - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
 * =============================================================================
 * You may choose which license applies to you:
 *
 * - If you're using this work with Open Source databases, you may choose
 *   either ASL or jOOQ License.
 * - If you're using this work with at least one commercial database, you must
 *   choose jOOQ License
 *
 * For more information, please visit http://www.jooq.org/licenses
 *
 * Apache Software License 2.0:
 * -----------------------------------------------------------------------------
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * jOOQ License and Maintenance Agreement:
 * -----------------------------------------------------------------------------
 * Data Geekery grants the Customer the non-exclusive, timely limited and
 * non-transferable license to install and use the Software under the terms of
 * the jOOQ License and Maintenance Agreement.
 *
 * This library is distributed with a LIMITED WARRANTY. See the jOOQ License
 * and Maintenance Agreement for more details: http://www.jooq.org/licensing
 */
package org.jooq.impl;

// ...
// ...
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
import static org.jooq.SQLDialect.HSQLDB;
// ...
// ...
import static org.jooq.SQLDialect.MARIADB;
import static org.jooq.SQLDialect.MYSQL;
// ...
// ...
// ...
import static org.jooq.SQLDialect.POSTGRES;
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...
import static org.jooq.impl.Term.ROW_NUMBER;
import static org.jooq.impl.Utils.combine;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Properties;

import javax.annotation.Generated;
import javax.sql.DataSource;

import org.jooq.AggregateFunction;
import org.jooq.AlterSequenceRestartStep;
import org.jooq.AlterTableStep;
// ...
import org.jooq.Case;
import org.jooq.CommonTableExpression;
import org.jooq.Condition;
import org.jooq.Configuration;
import org.jooq.ConnectionProvider;
import org.jooq.CreateIndexStep;
import org.jooq.CreateSequenceFinalStep;
import org.jooq.CreateTableAsStep;
import org.jooq.CreateViewAsStep;
import org.jooq.DSLContext;
import org.jooq.DataType;
import org.jooq.DatePart;
import org.jooq.Delete;
import org.jooq.DeleteWhereStep;
import org.jooq.DerivedColumnList;
import org.jooq.DropIndexFinalStep;
import org.jooq.DropSequenceFinalStep;
import org.jooq.DropTableStep;
import org.jooq.DropViewFinalStep;
import org.jooq.Field;
import org.jooq.GroupConcatOrderByStep;
import org.jooq.GroupField;
import org.jooq.Insert;
import org.jooq.InsertSetStep;
import org.jooq.InsertValuesStep1;
import org.jooq.InsertValuesStep10;
import org.jooq.InsertValuesStep11;
import org.jooq.InsertValuesStep12;
import org.jooq.InsertValuesStep13;
import org.jooq.InsertValuesStep14;
import org.jooq.InsertValuesStep15;
import org.jooq.InsertValuesStep16;
import org.jooq.InsertValuesStep17;
import org.jooq.InsertValuesStep18;
import org.jooq.InsertValuesStep19;
import org.jooq.InsertValuesStep2;
import org.jooq.InsertValuesStep20;
import org.jooq.InsertValuesStep21;
import org.jooq.InsertValuesStep22;
import org.jooq.InsertValuesStep3;
import org.jooq.InsertValuesStep4;
import org.jooq.InsertValuesStep5;
import org.jooq.InsertValuesStep6;
import org.jooq.InsertValuesStep7;
import org.jooq.InsertValuesStep8;
import org.jooq.InsertValuesStep9;
import org.jooq.InsertValuesStepN;
import org.jooq.Keyword;
import org.jooq.Merge;
import org.jooq.MergeKeyStep1;
import org.jooq.MergeKeyStep10;
import org.jooq.MergeKeyStep11;
import org.jooq.MergeKeyStep12;
import org.jooq.MergeKeyStep13;
import org.jooq.MergeKeyStep14;
import org.jooq.MergeKeyStep15;
import org.jooq.MergeKeyStep16;
import org.jooq.MergeKeyStep17;
import org.jooq.MergeKeyStep18;
import org.jooq.MergeKeyStep19;
import org.jooq.MergeKeyStep2;
import org.jooq.MergeKeyStep20;
import org.jooq.MergeKeyStep21;
import org.jooq.MergeKeyStep22;
import org.jooq.MergeKeyStep3;
import org.jooq.MergeKeyStep4;
import org.jooq.MergeKeyStep5;
import org.jooq.MergeKeyStep6;
import org.jooq.MergeKeyStep7;
import org.jooq.MergeKeyStep8;
import org.jooq.MergeKeyStep9;
import org.jooq.MergeKeyStepN;
import org.jooq.MergeUsingStep;
import org.jooq.Name;
import org.jooq.OrderedAggregateFunction;
import org.jooq.Param;
import org.jooq.QuantifiedSelect;
import org.jooq.Query;
import org.jooq.QueryPart;
import org.jooq.Record;
import org.jooq.Record1;
import org.jooq.Record10;
import org.jooq.Record11;
import org.jooq.Record12;
import org.jooq.Record13;
import org.jooq.Record14;
import org.jooq.Record15;
import org.jooq.Record16;
import org.jooq.Record17;
import org.jooq.Record18;
import org.jooq.Record19;
import org.jooq.Record2;
import org.jooq.Record20;
import org.jooq.Record21;
import org.jooq.Record22;
import org.jooq.Record3;
import org.jooq.Record4;
import org.jooq.Record5;
import org.jooq.Record6;
import org.jooq.Record7;
import org.jooq.Record8;
import org.jooq.Record9;
import org.jooq.RecordHandler;
import org.jooq.Result;
import org.jooq.ResultQuery;
import org.jooq.Row1;
import org.jooq.Row10;
import org.jooq.Row11;
import org.jooq.Row12;
import org.jooq.Row13;
import org.jooq.Row14;
import org.jooq.Row15;
import org.jooq.Row16;
import org.jooq.Row17;
import org.jooq.Row18;
import org.jooq.Row19;
import org.jooq.Row2;
import org.jooq.Row20;
import org.jooq.Row21;
import org.jooq.Row22;
import org.jooq.Row3;
import org.jooq.Row4;
import org.jooq.Row5;
import org.jooq.Row6;
import org.jooq.Row7;
import org.jooq.Row8;
import org.jooq.Row9;
import org.jooq.RowN;
import org.jooq.SQLDialect;
import org.jooq.Schema;
import org.jooq.Select;
import org.jooq.SelectSelectStep;
import org.jooq.SelectWhereStep;
import org.jooq.Sequence;
import org.jooq.SortField;
import org.jooq.Support;
import org.jooq.Table;
import org.jooq.TableLike;
import org.jooq.TruncateIdentityStep;
import org.jooq.UDTRecord;
import org.jooq.Update;
import org.jooq.UpdateSetFirstStep;
import org.jooq.WindowIgnoreNullsStep;
import org.jooq.WindowOverStep;
import org.jooq.WindowSpecification;
import org.jooq.WindowSpecificationFinalStep;
import org.jooq.WindowSpecificationOrderByStep;
import org.jooq.WindowSpecificationRowsAndStep;
import org.jooq.WindowSpecificationRowsStep;
import org.jooq.WithAsStep;
import org.jooq.WithStep;
import org.jooq.conf.RenderNameStyle;
import org.jooq.conf.Settings;
import org.jooq.exception.SQLDialectNotSupportedException;
import org.jooq.tools.Convert;
import org.jooq.tools.jdbc.JDBCUtils;
import org.jooq.types.DayToSecond;

/**
 * A DSL "entry point" providing implementations to the org.jooq
 * interfaces.
 * 

* The {@link DSLContext} and this DSL are the main entry point for * client code, to access jOOQ classes and functionality. Here, you can * instantiate all of those objects that cannot be accessed through other * objects. For example, to create a {@link Field} representing a constant * value, you can write: *

*

 * Field<String> field = DSL.val("Hello World")
 * 
*

* Another example is the EXISTS clause, which you can apply to any * SELECT to form a {@link Condition}: *

*

 * Condition condition = DSL.exists(DSL.select(...));
 * 
*

*

DSL and static imports
*

* For increased fluency and readability of your jOOQ client code, it is * recommended that you static import all methods from the DSL. For * example:

 * import static org.jooq.impl.DSL.*;
 *
 * public class Main {
 *   public static void main(String[] args) {
 *     DSL.select(val("Hello"), inline("World"));
 *     // DSL.val ^^^           ^^^^^^ DSL.inline
 *   }
 * }
 * 
*

* In order to use the "contextual DSL", call one of the various overloaded * {@link #using(Configuration)} methods: *

*

 * // Create and immediately execute a SELECT statement:
 * DSL.using(connection, dialect)
 *    .selectOne()
 *    .fetch();
 * 
* * @see DSLContext * @author Lukas Eder */ @SuppressWarnings({ "unchecked", "rawtypes" }) public class DSL { // ------------------------------------------------------------------------- // XXX Contextual factory methods // ------------------------------------------------------------------------- /** * Create an executor with a dialect configured. *

* Without a connection or data source, this executor cannot execute * queries. Use it to render SQL only. * * @param dialect The dialect to use with objects created from this executor */ public static DSLContext using(SQLDialect dialect) { return new DefaultDSLContext(dialect, null); } /** * Create an executor with a dialect and settings configured. *

* Without a connection or data source, this executor cannot execute * queries. Use it to render SQL only. * * @param dialect The dialect to use with objects created from this executor * @param settings The runtime settings to apply to objects created from * this executor */ public static DSLContext using(SQLDialect dialect, Settings settings) { return new DefaultDSLContext(dialect, settings); } /** * Create an executor from a JDBC connection URL. *

* The connections created this way will be closed upon finalization. This * is useful for standalone scripts, but not for managed connections. * * @param url The connection URL. * @see DefaultConnectionProvider * @see JDBCUtils#dialect(String) */ public static DSLContext using(String url) { try { Connection connection = DriverManager.getConnection(url); return using(new DefaultConnectionProvider(connection, true), JDBCUtils.dialect(connection)); } catch (SQLException e) { throw Utils.translate("Error when initialising Connection", e); } } /** * Create an executor from a JDBC connection URL. *

* The connections created this way will be closed upon finalization. This * is useful for standalone scripts, but not for managed connections. * * @param url The connection URL. * @param username The connection user name. * @param password The connection password. * @see DefaultConnectionProvider * @see JDBCUtils#dialect(String) */ public static DSLContext using(String url, String username, String password) { try { Connection connection = DriverManager.getConnection(url, username, password); return using(new DefaultConnectionProvider(connection, true), JDBCUtils.dialect(connection)); } catch (SQLException e) { throw Utils.translate("Error when initialising Connection", e); } } /** * Create an executor from a JDBC connection URL. *

* The connections created this way will be closed upon finalization. This * is useful for standalone scripts, but not for managed connections. * * @param url The connection URL. * @param properties The connection properties. * @see DefaultConnectionProvider * @see JDBCUtils#dialect(String) */ public static DSLContext using(String url, Properties properties) { try { Connection connection = DriverManager.getConnection(url, properties); return using(new DefaultConnectionProvider(connection, true), JDBCUtils.dialect(connection)); } catch (SQLException e) { throw Utils.translate("Error when initialising Connection", e); } } /** * Create an executor with a connection configured. *

* If you provide a JDBC connection to a jOOQ Configuration, jOOQ will use * that connection directly for creating statements. *

* This is a convenience constructor for * {@link #using(Connection, Settings)}, guessing the {@link SQLDialect} * using {@link JDBCUtils#dialect(Connection)} * * @param connection The connection to use with objects created from this * executor * @see DefaultConnectionProvider * @see JDBCUtils#dialect(Connection) */ public static DSLContext using(Connection connection) { return new DefaultDSLContext(connection, JDBCUtils.dialect(connection), null); } /** * Create an executor with a connection and a dialect configured. *

* If you provide a JDBC connection to a jOOQ Configuration, jOOQ will use * that connection directly for creating statements. *

* This is a convenience constructor for * {@link #using(ConnectionProvider, SQLDialect, Settings)} using a * {@link DefaultConnectionProvider} * * @param connection The connection to use with objects created from this * executor * @param dialect The dialect to use with objects created from this executor * @see DefaultConnectionProvider */ public static DSLContext using(Connection connection, SQLDialect dialect) { return new DefaultDSLContext(connection, dialect, null); } /** * Create an executor with a connection, a dialect and settings configured. *

* If you provide a JDBC connection to a jOOQ Configuration, jOOQ will use * that connection directly for creating statements. *

* This is a convenience constructor for * {@link #using(ConnectionProvider, SQLDialect, Settings)} using a * {@link DefaultConnectionProvider} and guessing the {@link SQLDialect} * using {@link JDBCUtils#dialect(Connection)} * * @param connection The connection to use with objects created from this * executor * @param settings The runtime settings to apply to objects created from * this executor * @see DefaultConnectionProvider * @see JDBCUtils#dialect(Connection) */ public static DSLContext using(Connection connection, Settings settings) { return new DefaultDSLContext(connection, JDBCUtils.dialect(connection), settings); } /** * Create an executor with a connection, a dialect and settings configured. *

* If you provide a JDBC connection to a jOOQ Configuration, jOOQ will use * that connection directly for creating statements. *

* This is a convenience constructor for * {@link #using(ConnectionProvider, SQLDialect, Settings)} using a * {@link DefaultConnectionProvider} * * @param connection The connection to use with objects created from this * executor * @param dialect The dialect to use with objects created from this executor * @param settings The runtime settings to apply to objects created from * this executor * @see DefaultConnectionProvider */ public static DSLContext using(Connection connection, SQLDialect dialect, Settings settings) { return new DefaultDSLContext(connection, dialect, settings); } /** * Create an executor with a data source and a dialect configured. *

* If you provide a JDBC data source to a jOOQ Configuration, jOOQ will use * that data source for initialising connections, and creating statements. *

* This is a convenience constructor for * {@link #using(ConnectionProvider, SQLDialect)} using a * {@link DataSourceConnectionProvider} * * @param datasource The data source to use with objects created from this * executor * @param dialect The dialect to use with objects created from this executor * @see DataSourceConnectionProvider */ public static DSLContext using(DataSource datasource, SQLDialect dialect) { return new DefaultDSLContext(datasource, dialect); } /** * Create an executor with a data source, a dialect and settings configured. *

* If you provide a JDBC data source to a jOOQ Configuration, jOOQ will use * that data source for initialising connections, and creating statements. *

* This is a convenience constructor for * {@link #using(ConnectionProvider, SQLDialect, Settings)} using a * {@link DataSourceConnectionProvider} * * @param datasource The data source to use with objects created from this * executor * @param dialect The dialect to use with objects created from this executor * @param settings The runtime settings to apply to objects created from * this executor * @see DataSourceConnectionProvider */ public static DSLContext using(DataSource datasource, SQLDialect dialect, Settings settings) { return new DefaultDSLContext(datasource, dialect, settings); } /** * Create an executor with a custom connection provider and a dialect * configured. * * @param connectionProvider The connection provider providing jOOQ with * JDBC connections * @param dialect The dialect to use with objects created from this executor */ public static DSLContext using(ConnectionProvider connectionProvider, SQLDialect dialect) { return new DefaultDSLContext(connectionProvider, dialect); } /** * Create an executor with a custom connection provider, a dialect and settings * configured. * * @param connectionProvider The connection provider providing jOOQ with * JDBC connections * @param dialect The dialect to use with objects created from this executor * @param settings The runtime settings to apply to objects created from * this executor */ public static DSLContext using(ConnectionProvider connectionProvider, SQLDialect dialect, Settings settings) { return new DefaultDSLContext(connectionProvider, dialect, settings); } /** * Create an executor from a custom configuration. * * @param configuration The configuration */ public static DSLContext using(Configuration configuration) { return new DefaultDSLContext(configuration); } // ------------------------------------------------------------------------- // XXX Static subselect factory methods // ------------------------------------------------------------------------- /** * Create a WITH clause to supply subsequent * SELECT, UPDATE, INSERT, * DELETE, and MERGE statements with * {@link CommonTableExpression}s. *

* The RECURSIVE keyword may be optional or unsupported in some * databases, in case of which it will not be rendered. For optimal database * interoperability and readability, however, it is suggested that you use * {@link #with(String)} for strictly non-recursive CTE * and {@link #withRecursive(String)} for strictly * recursive CTE. */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) public static WithAsStep with(String alias) { return new WithImpl(null, false).with(alias); } /** * Create a WITH clause to supply subsequent * SELECT, UPDATE, INSERT, * DELETE, and MERGE statements with * {@link CommonTableExpression}s. *

* The RECURSIVE keyword may be optional or unsupported in some * databases, in case of which it will not be rendered. For optimal database * interoperability and readability, however, it is suggested that you use * {@link #with(String, String...)} for strictly non-recursive CTE * and {@link #withRecursive(String, String...)} for strictly * recursive CTE. */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) public static WithAsStep with(String alias, String... fieldAliases) { return new WithImpl(null, false).with(alias, fieldAliases); } /** * Create a WITH clause to supply subsequent * SELECT, UPDATE, INSERT, * DELETE, and MERGE statements with * {@link CommonTableExpression}s. *

* Reusable {@link CommonTableExpression} types can be constructed through *

    *
  • {@link #name(String...)}
  • *
  • {@link Name#fields(String...)}
  • *
  • * {@link DerivedColumnList#as(Select)}
  • *
*

* The RECURSIVE keyword may be optional or unsupported in some * databases, in case of which it will not be rendered. For optimal database * interoperability and readability, however, it is suggested that you use * {@link #with(CommonTableExpression...)} for strictly non-recursive CTE * and {@link #withRecursive(CommonTableExpression...)} for strictly * recursive CTE. */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) public static WithStep with(CommonTableExpression... tables) { return new WithImpl(null, false).with(tables); } /** * Create a WITH clause to supply subsequent * SELECT, UPDATE, INSERT, * DELETE, and MERGE statements with * {@link CommonTableExpression}s. *

* The RECURSIVE keyword may be optional or unsupported in some * databases, in case of which it will not be rendered. For optimal database * interoperability and readability, however, it is suggested that you use * {@link #with(String)} for strictly non-recursive CTE * and {@link #withRecursive(String)} for strictly * recursive CTE. *

* Note that the {@link SQLDialect#H2} database only supports single-table, * RECURSIVE common table expression lists. */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static WithAsStep withRecursive(String alias) { return new WithImpl(null, true).with(alias); } /** * Create a WITH clause to supply subsequent * SELECT, UPDATE, INSERT, * DELETE, and MERGE statements with * {@link CommonTableExpression}s. *

* The RECURSIVE keyword may be optional or unsupported in some * databases, in case of which it will not be rendered. For optimal database * interoperability and readability, however, it is suggested that you use * {@link #with(String, String...)} for strictly non-recursive CTE * and {@link #withRecursive(String, String...)} for strictly * recursive CTE. *

* Note that the {@link SQLDialect#H2} database only supports single-table, * RECURSIVE common table expression lists. */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static WithAsStep withRecursive(String alias, String... fieldAliases) { return new WithImpl(null, true).with(alias, fieldAliases); } /** * Create a WITH clause to supply subsequent * SELECT, UPDATE, INSERT, * DELETE, and MERGE statements with * {@link CommonTableExpression}s. *

* Reusable {@link CommonTableExpression} types can be constructed through *

    *
  • {@link #name(String...)}
  • *
  • {@link Name#fields(String...)}
  • *
  • * {@link DerivedColumnList#as(Select)}
  • *
*

* The RECURSIVE keyword may be optional or unsupported in some * databases, in case of which it will not be rendered. For optimal database * interoperability and readability, however, it is suggested that you use * {@link #with(CommonTableExpression...)} for strictly non-recursive CTE * and {@link #withRecursive(CommonTableExpression...)} for strictly * recursive CTE. *

* Note that the {@link SQLDialect#H2} database only supports single-table, * RECURSIVE common table expression lists. */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static WithStep withRecursive(CommonTableExpression... tables) { return new WithImpl(null, true).with(tables); } /** * Create a new DSL select statement. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * SELECT * FROM [table] WHERE [conditions] ORDER BY [ordering] LIMIT [limit clause]
     * 
*/ @Support public static SelectWhereStep selectFrom(Table table) { return new SelectImpl(null, new DefaultConfiguration()).from(table); } /** * Create a new DSL subselect statement. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(fields)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Collection) */ @Support public static SelectSelectStep select(Collection> fields) { return new SelectImpl(null, new DefaultConfiguration()).select(fields); } /** * Create a new DSL subselect statement. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) */ @Support public static SelectSelectStep select(Field... fields) { return new SelectImpl(null, new DefaultConfiguration()).select(fields); } // [jooq-tools] START [select] /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Field#in(Select)}, {@link Field#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1) { return (SelectSelectStep) select(new Field[] { field1 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row2#in(Select)}, {@link Row2#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2) { return (SelectSelectStep) select(new Field[] { field1, field2 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row3#in(Select)}, {@link Row3#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3) { return (SelectSelectStep) select(new Field[] { field1, field2, field3 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row4#in(Select)}, {@link Row4#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, field4)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row5#in(Select)}, {@link Row5#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, field4, field5)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row6#in(Select)}, {@link Row6#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field5, field6)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row7#in(Select)}, {@link Row7#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field6, field7)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row8#in(Select)}, {@link Row8#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field7, field8)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row9#in(Select)}, {@link Row9#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field8, field9)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row10#in(Select)}, {@link Row10#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field9, field10)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row11#in(Select)}, {@link Row11#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field10, field11)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row12#in(Select)}, {@link Row12#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field11, field12)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row13#in(Select)}, {@link Row13#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field12, field13)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row14#in(Select)}, {@link Row14#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field13, field14)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row15#in(Select)}, {@link Row15#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field14, field15)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row16#in(Select)}, {@link Row16#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field15, field16)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row17#in(Select)}, {@link Row17#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field16, field17)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row18#in(Select)}, {@link Row18#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field17, field18)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row19#in(Select)}, {@link Row19#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field18, field19)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row20#in(Select)}, {@link Row20#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field19, field20)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row21#in(Select)}, {@link Row21#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field20, field21)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #select(Field...)}, except that it declares * additional record-level typesafety, which is needed by * {@link Row22#in(Select)}, {@link Row22#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * select(field1, field2, field3, .., field21, field22)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#select(Field...) * @see #select(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> select(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22) { return (SelectSelectStep) select(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22 }); } // [jooq-tools] END [select] /** * Create a new DSL subselect statement. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(fields)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Collection) */ @Support public static SelectSelectStep selectDistinct(Collection> fields) { return new SelectImpl(null, new DefaultConfiguration(), true).select(fields); } /** * Create a new DSL subselect statement. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) */ @Support public static SelectSelectStep selectDistinct(Field... fields) { return new SelectImpl(null, new DefaultConfiguration(), true).select(fields); } // [jooq-tools] START [selectDistinct] /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Field#in(Select)}, {@link Field#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1) { return (SelectSelectStep) selectDistinct(new Field[] { field1 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row2#in(Select)}, {@link Row2#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row3#in(Select)}, {@link Row3#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row4#in(Select)}, {@link Row4#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, field4)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row5#in(Select)}, {@link Row5#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, field4, field5)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row6#in(Select)}, {@link Row6#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field5, field6)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row7#in(Select)}, {@link Row7#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field6, field7)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row8#in(Select)}, {@link Row8#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field7, field8)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row9#in(Select)}, {@link Row9#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field8, field9)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row10#in(Select)}, {@link Row10#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field9, field10)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row11#in(Select)}, {@link Row11#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field10, field11)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row12#in(Select)}, {@link Row12#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field11, field12)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row13#in(Select)}, {@link Row13#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field12, field13)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row14#in(Select)}, {@link Row14#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field13, field14)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row15#in(Select)}, {@link Row15#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field14, field15)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row16#in(Select)}, {@link Row16#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field15, field16)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row17#in(Select)}, {@link Row17#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field16, field17)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row18#in(Select)}, {@link Row18#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field17, field18)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row19#in(Select)}, {@link Row19#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field18, field19)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row20#in(Select)}, {@link Row20#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field19, field20)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row21#in(Select)}, {@link Row21#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field20, field21)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21 }); } /** * Create a new DSL subselect statement. *

* This is the same as {@link #selectDistinct(Field...)}, except that it * declares additional record-level typesafety, which is needed by * {@link Row22#in(Select)}, {@link Row22#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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectDistinct(field1, field2, field3, .., field21, field22)
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSLContext#selectDistinct(Field...) * @see #selectDistinct(Field...) */ @Generated("This method was generated using jOOQ-tools") @Support public static SelectSelectStep> selectDistinct(Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22) { return (SelectSelectStep) selectDistinct(new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22 }); } // [jooq-tools] END [selectDistinct] /** * Create a new DSL subselect statement for a constant 0 * literal. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectZero()
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSL#zero() * @see DSLContext#selectZero() */ @Support public static SelectSelectStep> selectZero() { return new SelectImpl(null, new DefaultConfiguration()).select(zero().as("zero")); } /** * Create a new DSL subselect statement for a constant 1 * literal. *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectOne()
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSL#one() * @see DSLContext#selectOne() */ @Support public static SelectSelectStep> selectOne() { return new SelectImpl(null, new DefaultConfiguration()).select(one().as("one")); } /** * Create a new DSL subselect statement for COUNT(*). *

* 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: *

    *
  • As a subselect within another select
  • *
  • As a statement, after attaching it using * {@link Select#attach(org.jooq.Configuration)}
  • *
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * selectCount()
     *  .from(table1)
     *  .join(table2).on(field1.equal(field2))
     *  .where(field1.greaterThan(100))
     *  .orderBy(field2);
     * 
* * @see DSL#count() * @see DSLContext#selectCount() */ @Support public static SelectSelectStep> selectCount() { return new SelectImpl(null, new DefaultConfiguration()).select(count()); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* This type of insert may feel more convenient to some users, as it uses * the UPDATE statement's SET a = b syntax. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table)
     *   .set(field1, value1)
     *   .set(field2, value2)
     *   .newRecord()
     *   .set(field1, value3)
     *   .set(field2, value4)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table) */ @Support public static InsertSetStep insertInto(Table into) { return using(new DefaultConfiguration()).insertInto(into); } // [jooq-tools] START [insert] /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1)
     *   .values(field1)
     *   .values(field1)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep1 insertInto(Table into, Field field1) { return (InsertValuesStep1) insertInto(into, new Field[] { field1 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2)
     *   .values(field1, field2)
     *   .values(field1, field2)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep2 insertInto(Table into, Field field1, Field field2) { return (InsertValuesStep2) insertInto(into, new Field[] { field1, field2 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3)
     *   .values(field1, field2, field3)
     *   .values(field1, field2, field3)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep3 insertInto(Table into, Field field1, Field field2, Field field3) { return (InsertValuesStep3) insertInto(into, new Field[] { field1, field2, field3 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, field4)
     *   .values(field1, field2, field3, field4)
     *   .values(field1, field2, field3, field4)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep4 insertInto(Table into, Field field1, Field field2, Field field3, Field field4) { return (InsertValuesStep4) insertInto(into, new Field[] { field1, field2, field3, field4 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, field4, field5)
     *   .values(field1, field2, field3, field4, field5)
     *   .values(field1, field2, field3, field4, field5)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep5 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5) { return (InsertValuesStep5) insertInto(into, new Field[] { field1, field2, field3, field4, field5 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field5, field6)
     *   .values(valueA1, valueA2, valueA3, .., valueA5, valueA6)
     *   .values(valueB1, valueB2, valueB3, .., valueB5, valueB6)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep6 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6) { return (InsertValuesStep6) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field6, field7)
     *   .values(valueA1, valueA2, valueA3, .., valueA6, valueA7)
     *   .values(valueB1, valueB2, valueB3, .., valueB6, valueB7)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep7 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7) { return (InsertValuesStep7) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field7, field8)
     *   .values(valueA1, valueA2, valueA3, .., valueA7, valueA8)
     *   .values(valueB1, valueB2, valueB3, .., valueB7, valueB8)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep8 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8) { return (InsertValuesStep8) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field8, field9)
     *   .values(valueA1, valueA2, valueA3, .., valueA8, valueA9)
     *   .values(valueB1, valueB2, valueB3, .., valueB8, valueB9)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep9 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9) { return (InsertValuesStep9) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field9, field10)
     *   .values(valueA1, valueA2, valueA3, .., valueA9, valueA10)
     *   .values(valueB1, valueB2, valueB3, .., valueB9, valueB10)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep10 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10) { return (InsertValuesStep10) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field10, field11)
     *   .values(valueA1, valueA2, valueA3, .., valueA10, valueA11)
     *   .values(valueB1, valueB2, valueB3, .., valueB10, valueB11)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep11 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11) { return (InsertValuesStep11) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field11, field12)
     *   .values(valueA1, valueA2, valueA3, .., valueA11, valueA12)
     *   .values(valueB1, valueB2, valueB3, .., valueB11, valueB12)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep12 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12) { return (InsertValuesStep12) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field12, field13)
     *   .values(valueA1, valueA2, valueA3, .., valueA12, valueA13)
     *   .values(valueB1, valueB2, valueB3, .., valueB12, valueB13)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep13 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13) { return (InsertValuesStep13) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field13, field14)
     *   .values(valueA1, valueA2, valueA3, .., valueA13, valueA14)
     *   .values(valueB1, valueB2, valueB3, .., valueB13, valueB14)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep14 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14) { return (InsertValuesStep14) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field14, field15)
     *   .values(valueA1, valueA2, valueA3, .., valueA14, valueA15)
     *   .values(valueB1, valueB2, valueB3, .., valueB14, valueB15)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep15 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15) { return (InsertValuesStep15) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field15, field16)
     *   .values(valueA1, valueA2, valueA3, .., valueA15, valueA16)
     *   .values(valueB1, valueB2, valueB3, .., valueB15, valueB16)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep16 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16) { return (InsertValuesStep16) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field16, field17)
     *   .values(valueA1, valueA2, valueA3, .., valueA16, valueA17)
     *   .values(valueB1, valueB2, valueB3, .., valueB16, valueB17)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep17 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17) { return (InsertValuesStep17) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field17, field18)
     *   .values(valueA1, valueA2, valueA3, .., valueA17, valueA18)
     *   .values(valueB1, valueB2, valueB3, .., valueB17, valueB18)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep18 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18) { return (InsertValuesStep18) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field18, field19)
     *   .values(valueA1, valueA2, valueA3, .., valueA18, valueA19)
     *   .values(valueB1, valueB2, valueB3, .., valueB18, valueB19)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep19 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19) { return (InsertValuesStep19) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field19, field20)
     *   .values(valueA1, valueA2, valueA3, .., valueA19, valueA20)
     *   .values(valueB1, valueB2, valueB3, .., valueB19, valueB20)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep20 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20) { return (InsertValuesStep20) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field20, field21)
     *   .values(valueA1, valueA2, valueA3, .., valueA20, valueA21)
     *   .values(valueB1, valueB2, valueB3, .., valueB20, valueB21)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep21 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21) { return (InsertValuesStep21) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21 }); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2, field3, .., field21, field22)
     *   .values(valueA1, valueA2, valueA3, .., valueA21, valueA22)
     *   .values(valueB1, valueB2, valueB3, .., valueB21, valueB22)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support public static InsertValuesStep22 insertInto(Table into, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22) { return (InsertValuesStep22) insertInto(into, new Field[] { field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22 }); } // [jooq-tools] END [insert] /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2)
     *   .values(valueA1, valueA2)
     *   .values(valueB1, valueB2)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Field...) */ @Support public static InsertValuesStepN insertInto(Table into, Field... fields) { return using(new DefaultConfiguration()).insertInto(into, fields); } /** * Create a new DSL insert statement. *

* Unlike {@link Insert} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * INSERT statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * insertInto(table, field1, field2)
     *   .values(valueA1, valueA2)
     *   .values(valueB1, valueB2)
     *   .onDuplicateKeyUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     * 
* * @see DSLContext#insertInto(Table, Collection) */ @Support public static InsertValuesStepN insertInto(Table into, Collection> fields) { return using(new DefaultConfiguration()).insertInto(into, fields); } /** * Create a new DSL update statement. *

* Unlike {@link Update} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * UPDATE statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * update(table)
     *   .set(field1, value1)
     *   .set(field2, value2)
     *   .where(field1.greaterThan(100))
     * 
*

* Note that some databases support table expressions more complex than * simple table references. In CUBRID and MySQL, for instance, you can write *

     * update(t1.join(t2).on(t1.id.eq(t2.id)))
     *   .set(t1.value, value1)
     *   .set(t2.value, value2)
     *   .where(t1.id.eq(10))
     * 
*/ @Support public static UpdateSetFirstStep update(Table table) { return using(new DefaultConfiguration()).update(table); } /** * Create a new DSL SQL standard MERGE statement. *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
dialectsupport typedocumentation
CUBRIDSQL:2008 standard and some enhancementshttp://www.cubrid.org/manual/90/en/MERGE
DB2SQL:2008 standard and major enhancementshttp://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com. * ibm.db2.udb.admin.doc/doc/r0010873.htm
HSQLDBSQL:2008 standardhttp://hsqldb.org/doc/2.0/guide/dataaccess-chapt.html#N129BA
OracleSQL:2008 standard and minor enhancementshttp://download.oracle.com/docs/cd/B28359_01/server.111/b28286/ * statements_9016.htm
SQL ServerSimilar to SQL:2008 standard with some major enhancementshttp://msdn.microsoft.com/de-de/library/bb510625.aspx
SybaseSimilar to SQL:2008 standard with some major enhancementshttp://dcx.sybase.com/1100/en/dbreference_en11/merge-statement.html
*

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * mergeInto(table)
     *   .using(select)
     *   .on(condition)
     *   .whenMatchedThenUpdate()
     *   .set(field1, value1)
     *   .set(field2, value2)
     *   .whenNotMatchedThenInsert(field1, field2)
     *   .values(value1, value2)
     * 
*

* Note: Using this method, you can also create an H2-specific MERGE * statement without field specification. See also * {@link #mergeInto(Table, Field...)} * * @see DSLContext#mergeInto(Table) */ @Support({ CUBRID, HSQLDB }) public static MergeUsingStep mergeInto(Table table) { return using(new DefaultConfiguration()).mergeInto(table); } // [jooq-tools] START [merge] /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep1 mergeInto(Table table, Field field1) { return using(new DefaultConfiguration()).mergeInto(table, field1); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep2 mergeInto(Table table, Field field1, Field field2) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep3 mergeInto(Table table, Field field1, Field field2, Field field3) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep4 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep5 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep6 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep7 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep8 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep9 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep10 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep11 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep12 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep13 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep14 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep15 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep16 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep17 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep18 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep19 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep20 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep21 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field, Field) */ @Generated("This method was generated using jOOQ-tools") @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStep22 mergeInto(Table table, Field field1, Field field2, Field field3, Field field4, Field field5, Field field6, Field field7, Field field8, Field field9, Field field10, Field field11, Field field12, Field field13, Field field14, Field field15, Field field16, Field field17, Field field18, Field field19, Field field20, Field field21, Field field22) { return using(new DefaultConfiguration()).mergeInto(table, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11, field12, field13, field14, field15, field16, field17, field18, field19, field20, field21, field22); } // [jooq-tools] END [merge] /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. *

* This statement is available from DSL syntax only. It is known to be * supported in some way by any of these dialects: *

* * * * * * * * * * *
H2H2 natively supports this special syntaxwww.h2database.com/html/grammar.html#merge
DB2, HSQLDB, Oracle, SQL Server, Sybase SQL AnywhereThese databases can simulate the H2-specific MERGE statement using a * standard SQL MERGE statement, without restrictionsSee {@link #mergeInto(Table)} for the standard MERGE statement
* * @see DSLContext#mergeInto(Table, Field...) */ @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStepN mergeInto(Table table, Field... fields) { return using(new DefaultConfiguration()).mergeInto(table, fields); } /** * Create a new DSL merge statement (H2-specific syntax). *

* Unlike {@link Merge} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * MERGE statement. * * @see DSLContext#mergeInto(Table, Collection) */ @Support({ CUBRID, H2, HSQLDB }) public static MergeKeyStepN mergeInto(Table table, Collection> fields) { return using(new DefaultConfiguration()).mergeInto(table, fields); } /** * Create a new DSL delete statement. *

* Unlike {@link Delete} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * DELETE statement. *

* Example:

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * delete(table)
     *   .where(field1.greaterThan(100))
     * 
*

* Some but not all databases support aliased tables in delete statements. * * @see DSLContext#delete(Table) */ @Support public static DeleteWhereStep delete(Table table) { return using(new DefaultConfiguration()).delete(table); } // ------------------------------------------------------------------------- // XXX DDL Statements // ------------------------------------------------------------------------- /** * Create a new DSL CREATE TABLE statement. * * @see DSLContext#createTable(String) */ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static CreateTableAsStep createTable(String tableName) { return createTable(tableByName(tableName)); } /** * Create a new DSL CREATE TABLE statement. * * @see DSLContext#createTable(Table) */ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static CreateTableAsStep createTable(Table table) { return using(new DefaultConfiguration()).createTable(table); } /** * Create a new DSL CREATE VIEW statement. * * @see DSLContext#createView(String, String...) */ @Support public static CreateViewAsStep createView(String viewName, String... fieldNames) { return createView(tableByName(viewName), Utils.fieldsByName(viewName, fieldNames)); } /** * Create a new DSL CREATE VIEW statement. * * @see DSLContext#createView(Table, Field...) */ @Support public static CreateViewAsStep createView(Table view, Field... fields) { return using(new DefaultConfiguration()).createView(view, fields); } /** * Create a new DSL CREATE INDEX statement. * * @see DSLContext#createIndex(String) */ @Support public static CreateIndexStep createIndex(String index) { return using(new DefaultConfiguration()).createIndex(index); } /** * Create a new DSL CREATE SEQUENCE statement. * * @see DSLContext#createSequence(Sequence) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, POSTGRES }) public static CreateSequenceFinalStep createSequence(Sequence sequence) { return using(new DefaultConfiguration()).createSequence(sequence); } /** * Create a new DSL CREATE SEQUENCE statement. * * @see DSLContext#createSequence(String) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, POSTGRES }) public static CreateSequenceFinalStep createSequence(String sequence) { return using(new DefaultConfiguration()).createSequence(sequence); } /** * Create a new DSL ALTER SEQUENCE statement. * * @see DSLContext#alterSequence(Sequence) */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static AlterSequenceRestartStep alterSequence(Sequence sequence) { return using(new DefaultConfiguration()).alterSequence(sequence); } /** * Create a new DSL ALTER SEQUENCE statement. * * @see DSLContext#alterSequence(String) */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static AlterSequenceRestartStep alterSequence(String sequence) { return using(new DefaultConfiguration()).alterSequence(sequence); } /** * Create a new DSL ALTER TABLE statement. * * @see DSLContext#alterTable(Table) */ @Support public static AlterTableStep alterTable(Table table) { return using(new DefaultConfiguration()).alterTable(table); } /** * Create a new DSL ALTER TABLE statement. * * @see DSLContext#alterTable(String) */ @Support public static AlterTableStep alterTable(String table) { return using(new DefaultConfiguration()).alterTable(table); } /** * Create a new DSL DROP VIEW statement. * * @see DSLContext#dropView(Table) */ @Support public static DropViewFinalStep dropView(Table table) { return using(new DefaultConfiguration()).dropView(table); } /** * Create a new DSL DROP VIEW statement. * * @see DSLContext#dropView(String) */ @Support public static DropViewFinalStep dropView(String table) { return using(new DefaultConfiguration()).dropView(table); } /** * Create a new DSL DROP VIEW IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropViewIfExists(Table) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static DropViewFinalStep dropViewIfExists(Table table) { return using(new DefaultConfiguration()).dropViewIfExists(table); } /** * Create a new DSL DROP VIEW IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropViewIfExists(String) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static DropViewFinalStep dropViewIfExists(String table) { return using(new DefaultConfiguration()).dropViewIfExists(table); } /** * Create a new DSL DROP TABLE statement. * * @see DSLContext#dropTable(Table) */ @Support public static DropTableStep dropTable(Table table) { return using(new DefaultConfiguration()).dropTable(table); } /** * Create a new DSL DROP TABLE statement. * * @see DSLContext#dropTable(String) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static DropTableStep dropTableIfExists(String table) { return using(new DefaultConfiguration()).dropTableIfExists(table); } /** * Create a new DSL DROP TABLE IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropTableIfExists(Table) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static DropTableStep dropTableIfExists(Table table) { return using(new DefaultConfiguration()).dropTableIfExists(table); } /** * Create a new DSL DROP TABLE IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropTableIfExists(String) */ @Support public static DropTableStep dropTable(String table) { return using(new DefaultConfiguration()).dropTable(table); } /** * Create a new DSL DROP INDEX statement. * * @see DSLContext#dropIndex(String) */ @Support public static DropIndexFinalStep dropIndex(String index) { return using(new DefaultConfiguration()).dropIndex(index); } /** * Create a new DSL DROP INDEX IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropIndexIfExists(String) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static DropIndexFinalStep dropIndexIfExists(String index) { return using(new DefaultConfiguration()).dropIndexIfExists(index); } /** * Create a new DSL DROP SEQUENCE statement. * * @see DSLContext#dropSequence(Sequence) */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static DropSequenceFinalStep dropSequence(Sequence sequence) { return using(new DefaultConfiguration()).dropSequence(sequence); } /** * Create a new DSL DROP SEQUENCE statement. * * @see DSLContext#dropSequence(String) */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static DropSequenceFinalStep dropSequence(String sequence) { return using(new DefaultConfiguration()).dropSequence(sequence); } /** * Create a new DSL DROP SEQUENCE IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropSequenceIfExists(Sequence) */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static DropSequenceFinalStep dropSequenceIfExists(Sequence sequence) { return using(new DefaultConfiguration()).dropSequenceIfExists(sequence); } /** * Create a new DSL DROP SEQUENCE IF EXISTS statement. *

* If your database doesn't natively support IF EXISTS, this is * emulated by catching (and ignoring) the relevant {@link SQLException}. * * @see DSLContext#dropSequenceIfExists(String) */ @Support({ FIREBIRD, H2, HSQLDB, POSTGRES }) public static DropSequenceFinalStep dropSequenceIfExists(String sequence) { return using(new DefaultConfiguration()).dropSequenceIfExists(sequence); } /** * Create a new DSL truncate statement. *

* Unlike {@link Delete} factory methods in the {@link DSLContext} API, this * creates an unattached, and thus not directly renderable or executable * DELETE statement. *

* Example: *

*

     * import static org.jooq.impl.DSL.*;
     *
     * // [...]
     *
     * truncate(table);
     * 
*

Simulation of TRUNCATE

*

* Most dialects implement the TRUNCATE statement. If it is not * supported, it is simulated using an equivalent DELETE * statement. This is particularly true for these dialects: *

    *
  • {@link SQLDialect#FIREBIRD}
  • *
  • {@link SQLDialect#INGRES}
  • *
  • {@link SQLDialect#SQLITE}
  • *
*

Vendor-specific extensions of TRUNCATE

*

* Some statements also support extensions of the TRUNCATE * statement, such as Postgres: *

*

     * truncate(table)
     *   .restartIdentity()
     *   .cascade()
     * 
*

* These vendor-specific extensions are currently not simulated for those * dialects that do not support them natively. * * @see DSLContext#truncate(Table) */ @Support public static TruncateIdentityStep truncate(Table table) { return using(new DefaultConfiguration()).truncate(table); } // ------------------------------------------------------------------------- // XXX Quantified comparison predicate expressions // ------------------------------------------------------------------------- /** * Create an ALL quantified select to be used in quantified * comparison predicate expressions. * * @see Field#equal(QuantifiedSelect) * @see Field#notEqual(QuantifiedSelect) * @see Field#greaterThan(QuantifiedSelect) * @see Field#greaterOrEqual(QuantifiedSelect) * @see Field#lessThan(QuantifiedSelect) * @see Field#lessOrEqual(QuantifiedSelect) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static QuantifiedSelect all(Select select) { return new QuantifiedSelectImpl(Quantifier.ALL, select); } /** * Create an ALL quantified select to be used in quantified * comparison predicate expressions. *

* This is natively supported by {@link SQLDialect#POSTGRES}. Other dialects * will render a subselect unnesting the array. * * @see Field#equal(QuantifiedSelect) * @see Field#notEqual(QuantifiedSelect) * @see Field#greaterThan(QuantifiedSelect) * @see Field#greaterOrEqual(QuantifiedSelect) * @see Field#lessThan(QuantifiedSelect) * @see Field#lessOrEqual(QuantifiedSelect) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static QuantifiedSelect> all(T... array) { return all(val(array)); } /** * Create an ALL quantified select to be used in quantified * comparison predicate expressions. *

* This is natively supported by {@link SQLDialect#POSTGRES}. Other dialects * will render a subselect unnesting the array. * * @see Field#equal(QuantifiedSelect) * @see Field#notEqual(QuantifiedSelect) * @see Field#greaterThan(QuantifiedSelect) * @see Field#greaterOrEqual(QuantifiedSelect) * @see Field#lessThan(QuantifiedSelect) * @see Field#lessOrEqual(QuantifiedSelect) */ @Support({ H2, HSQLDB, POSTGRES }) public static QuantifiedSelect> all(Field array) { return new QuantifiedSelectImpl>(Quantifier.ALL, array); } /** * Create an ANY quantified select to be used in quantified * comparison predicate expressions. * * @see Field#equal(QuantifiedSelect) * @see Field#notEqual(QuantifiedSelect) * @see Field#greaterThan(QuantifiedSelect) * @see Field#greaterOrEqual(QuantifiedSelect) * @see Field#lessThan(QuantifiedSelect) * @see Field#lessOrEqual(QuantifiedSelect) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static QuantifiedSelect any(Select select) { return new QuantifiedSelectImpl(Quantifier.ANY, select); } /** * Create an ANY quantified select to be used in quantified * comparison predicate expressions. *

* This is natively supported by {@link SQLDialect#POSTGRES}. Other dialects * will render a subselect unnesting the array. * * @see Field#equal(QuantifiedSelect) * @see Field#notEqual(QuantifiedSelect) * @see Field#greaterThan(QuantifiedSelect) * @see Field#greaterOrEqual(QuantifiedSelect) * @see Field#lessThan(QuantifiedSelect) * @see Field#lessOrEqual(QuantifiedSelect) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static QuantifiedSelect> any(T... array) { return any(val(array)); } /** * Create an ANY quantified select to be used in quantified * comparison predicate expressions. *

* This is natively supported by {@link SQLDialect#POSTGRES}. Other dialects * will render a subselect unnesting the array. * * @see Field#equal(QuantifiedSelect) * @see Field#notEqual(QuantifiedSelect) * @see Field#greaterThan(QuantifiedSelect) * @see Field#greaterOrEqual(QuantifiedSelect) * @see Field#lessThan(QuantifiedSelect) * @see Field#lessOrEqual(QuantifiedSelect) */ @Support({ H2, HSQLDB, POSTGRES }) public static QuantifiedSelect> any(Field array) { return new QuantifiedSelectImpl>(Quantifier.ANY, array); } // ------------------------------------------------------------------------- // XXX Conversion of objects into tables // ------------------------------------------------------------------------- /** * A synonym for {@link Select#asTable()}, which might look a bit more fluent * like this, to some users. * * @see Select#asTable() */ @Support public static Table table(Select select) { return select.asTable(); } /** * Use a previously obtained result as a new {@link Table} that can be used * in SQL statements through {@link #values(RowN...)}. * * @see #values(RowN...) */ @Support public static Table table(Result result) { int size = result.size(); RowN[] rows = new RowN[size]; for (int i = 0; i < size; i++) rows[i] = (RowN) result.get(i).valuesRow(); Field[] fields = result.fields(); String[] columns = new String[fields.length]; for (int i = 0; i < fields.length; i++) columns[i] = fields[i].getName(); // TODO [#2986] Coerce the record type upon the resulting table. return (Table) values(rows).as("v", columns); } /** * A synonym for {@link #unnest(List)}. * * @see #unnest(List) */ @Support public static Table table(List list) { return table(list.toArray()); } /** * A synonym for {@link #unnest(Object[])}. * * @see #unnest(Object[]) */ @Support public static Table table(Object[] array) { return table(val(array)); } /* [pro] xx xxx x x xxxxxxx xxx xxxxxx xxxxxxxxxxxxxxxxxxxxxx x x xxxx xxxxxxxxxxxxxxxxxxxx xx xxxxxxxxxxxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxx x xxxxxx xxxxxxxxxxxxxxxxxx x xx [/pro] */ /** * A synonym for {@link #unnest(Field)}. * * @see #unnest(Field) */ @Support({ H2, HSQLDB, POSTGRES }) public static Table table(Field cursor) { return unnest(cursor); } /** * Create a table from a list of values. *

* This is equivalent to the TABLE function for H2, or the * UNNEST function in HSQLDB and Postgres *

* For Oracle, use {@link #table(ArrayRecord)} instead, as Oracle knows only * typed arrays *

* In all other dialects, unnesting of arrays is simulated using several * UNION ALL connected subqueries. */ @Support public static Table unnest(List list) { return unnest(list.toArray()); } /** * Create a table from an array of values. *

* This is equivalent to the TABLE function for H2, or the * UNNEST function in HSQLDB and Postgres *

* For Oracle, use {@link #table(ArrayRecord)} instead, as Oracle knows only * typed arrays *

* In all other dialects, unnesting of arrays is simulated using several * UNION ALL connected subqueries. */ @Support public static Table unnest(Object[] array) { return unnest(val(array)); } /* [pro] xx xxx x xxxxxx x xxxxx xxxx xx xxxxx xx xxxxxxx x xxx x xxxx xxxxx xxx xxxxxxxx xxxxx xx x xxxxxxxxxxxxxxxxxx xxxxxxxx xxx x xxxxxxx xxxxxxxxxx xxxx xxxxxx xxxxx xxxxx xxxxxx xx xxxxxxxxxxxxxxxx xxxxxx xxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxx xxxxxx x xxxxxx xxxxxxxxxxxxxxxxxxx x xx [/pro] */ /** * Create a table from a field. *

* The supplied field can have any of these types: *

    *
  • {@link Result}: For CURSOR or REF CURSOR * fields, typically fetched from stored functions or from nested tables
  • *
  • {@link ArrayRecord}: For Oracle-style VARRAY types.
  • *
  • {@link Object}[]: Array types, for other RDBMS's ARRAY types (e.g. * H2, HSQLDB, and Postgres)
  • *
  • {@link Object}: Any other type that jOOQ will try to convert in an * array first, before converting that array into a table
  • *
*

* This functionality has only limited scope when used in H2, as ARRAY types * involved with stored functions can only be of type Object[]. * Such arrays are converted into VARCHAR arrays by jOOQ. *

* In all dialects where arrays are not supported, unnesting of arrays is * simulated using several UNION ALL connected subqueries. */ @Support({ H2, HSQLDB, POSTGRES }) public static Table unnest(Field cursor) { if (cursor == null) { throw new IllegalArgumentException(); } // The field is an actual CURSOR or REF CURSOR returned from a stored // procedure or from a NESTED TABLE else if (cursor.getType() == Result.class) { return new FunctionTable(cursor); } /* [pro] xx xx xxx xxxxx xx xx xxxxxxxxxxxx xxxxxx xxxxxxxx xxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxx x xx xxx xxxxx xx xx xxxxxxxxxxxx xxxxxx xxxxx xxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxx x xx [/pro] */ // The field is a regular array else if (cursor.getType().isArray() && cursor.getType() != byte[].class) { return new ArrayTable(cursor); } // The field has any other type. Try to make it an array throw new SQLDialectNotSupportedException("Converting arbitrary types into array tables is currently not supported"); } // ------------------------------------------------------------------------- // XXX Table functions // ------------------------------------------------------------------------- /** * The DUAL table to be used for syntactic completeness. *

* In general, jOOQ will generate a DUAL table (or any * equivalent construct, see below), if this is needed syntactically in * generated SQL. You may still wish to explicitly use a DUAL * construct in jOOQ code for various reasons. This DUAL table * will always contain a single record with a single varchar(1) value: *

     * +-------+
     * | DUMMY |
     * +-------+
     * | X     |
     * +-------+
     * 
*/ @Support public static Table dual() { return new Dual(true); } /** * A table function generating a series of values from from to * to (inclusive). *

* This function is inspired by PostgreSQL's * GENERATE_SERIES(from, to) function. Other SQL dialects may * be capable of emulating this behaviour, e.g. Oracle:

     * -- PostgreSQL
     * SELECT * FROM GENERATE_SERIES(a, b)
     *
     * -- Oracle
     * SELECT * FROM (SELECT a + LEVEL - 1 FROM DUAL CONNECT BY a + LEVEL - 1 <= b)
     * 
*/ @Support({ CUBRID, POSTGRES }) public static Table> generateSeries(int from, int to) { return generateSeries(val(from), val(to)); } /** * A table function generating a series of values from from to * to (inclusive). *

* This function is inspired by PostgreSQL's * GENERATE_SERIES(from, to) function. Other SQL dialects may * be capable of emulating this behaviour, e.g. Oracle:

     * -- PostgreSQL
     * SELECT * FROM GENERATE_SERIES(a, b)
     *
     * -- Oracle
     * SELECT * FROM (SELECT a + LEVEL - 1 FROM DUAL CONNECT BY a + LEVEL - 1 <= b)
     * 
*/ @Support({ CUBRID, POSTGRES }) public static Table> generateSeries(int from, Field to) { return generateSeries(val(from), nullSafe(to)); } /** * A table function generating a series of values from from to * to (inclusive). *

* This function is inspired by PostgreSQL's * GENERATE_SERIES(from, to) function. Other SQL dialects may * be capable of emulating this behaviour, e.g. Oracle:

     * -- PostgreSQL
     * SELECT * FROM GENERATE_SERIES(a, b)
     *
     * -- Oracle
     * SELECT * FROM (SELECT a + LEVEL - 1 FROM DUAL CONNECT BY a + LEVEL - 1 <= b)
     * 
*/ @Support({ CUBRID, POSTGRES }) public static Table> generateSeries(Field from, int to) { return new GenerateSeries(nullSafe(from), val(to)); } /** * A table function generating a series of values from from to * to (inclusive). *

* This function is inspired by PostgreSQL's * GENERATE_SERIES(from, to) function. Other SQL dialects may * be capable of emulating this behaviour, e.g. Oracle:

     * -- PostgreSQL
     * SELECT * FROM GENERATE_SERIES(a, b)
     *
     * -- Oracle
     * SELECT * FROM (SELECT a + LEVEL - 1 FROM DUAL CONNECT BY a + LEVEL - 1 <= b)
     * 
*/ @Support({ CUBRID, POSTGRES }) public static Table> generateSeries(Field from, Field to) { return new GenerateSeries(nullSafe(from), nullSafe(to)); } /** * Create a LATERAL joined table. *

* Example: *

     * SELECT *
     * FROM employees e,
     *      LATERAL(SELECT * FROM departments d
     *              WHERE e.department_id = d.department_id);
     * 
*/ @Support({ POSTGRES }) public static Table lateral(TableLike table) { return new Lateral(table.asTable()); } // ------------------------------------------------------------------------- // XXX SQL keywords // ------------------------------------------------------------------------- /** * Create a SQL keyword. *

* A Keyword is a {@link QueryPart} that renders a SQL keyword * according to the settings specified in * {@link Settings#getRenderKeywordStyle()}. It can be embedded in other * plain SQL QueryParts as shown in this example: *

*

     * Condition c = condition("{0} {1} {2} {3} {4}",
     *     value1, keyword("between")
     *     value2, keyword("and")
     *     value3
     * );
     * 
*/ public static Keyword keyword(String keyword) { return new KeywordImpl(keyword); } // ------------------------------------------------------------------------- // XXX SQL identifiers // ------------------------------------------------------------------------- /** * Create a DEFAULT keyword for use with INSERT, * UPDATE, or MERGE statements. *

* While the DEFAULT keyword works with all data types, you may * still prefer to associate a {@link Field} type with your * DEFAULT value. In that case, use * {@link #defaultValue(Class)} or {@link #defaultValue(DataType)} instead. */ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field defaultValue() { return defaultValue(Object.class); } /** * Create a DEFAULT keyword for use with INSERT, * UPDATE, or MERGE statements. */ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field defaultValue(Class type) { return defaultValue(getDataType(type)); } /** * Create a DEFAULT keyword for use with INSERT, * UPDATE, or MERGE statements. */ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field defaultValue(DataType type) { return new SQLField(type, keyword("default")); } /** * Create a DEFAULT keyword for use with INSERT, * UPDATE, or MERGE statements. */ @Support({ CUBRID, DERBY, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field defaultValue(Field field) { return new SQLField(field.getDataType(), keyword("default")); } /** * Create a new SQL identifier using a qualified name. *

* Use this method to construct syntax-safe, SQL-injection-safe SQL * identifiers for use in plain SQL where {@link QueryPart} objects are * accepted. For instance, this can be used with any of these methods: *

    *
  • {@link #field(String, QueryPart...)}
  • *
  • {@link #field(String, Class, QueryPart...)}
  • *
  • {@link #field(String, DataType, QueryPart...)}
  • *
*

* An example:

     * // This qualified name here
     * name("book", "title");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [book].[title]
     * 
* * @param qualifiedName The SQL identifier's qualified name parts * @return A {@link QueryPart} that will render the SQL identifier */ public static Name name(String... qualifiedName) { return new NameImpl(qualifiedName); } /** * Create a qualified schema, given its schema name. *

* This constructs a schema reference given the schema's qualified name. * jOOQ will render the schema name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This schema...
     * schemaByName("MY_SCHEMA");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA]
     * 
* * @param name The schema's reference name. * @return A schema referenced by name */ @Support public static Schema schemaByName(String name) { return new SchemaImpl(name); } /** * Create a qualified sequence, given its sequence name. *

* This constructs a sequence reference given the sequence's qualified name. * jOOQ will render the sequence name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This sequence...
     * sequenceByName("MY_SCHEMA", "MY_SEQUENCE");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_SEQUENCE]
     * 
* * @param qualifiedName The various parts making up your sequence's * reference name. * @return A sequence referenced by sequenceName */ @Support public static Sequence sequenceByName(String... qualifiedName) { return sequenceByName(BigInteger.class, qualifiedName); } /** * Create a qualified sequence, given its sequence name. *

* This constructs a sequence reference given the sequence's qualified name. * jOOQ will render the sequence name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This sequence...
     * sequenceByName("MY_SCHEMA", "MY_SEQUENCE");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_SEQUENCE]
     * 
* * @param qualifiedName The various parts making up your sequence's * reference name. * @param type The type of the returned field * @return A sequence referenced by sequenceName */ @Support public static Sequence sequenceByName(Class type, String... qualifiedName) { return sequenceByName(getDataType(type), qualifiedName); } /** * Create a qualified sequence, given its sequence name. *

* This constructs a sequence reference given the sequence's qualified name. * jOOQ will render the sequence name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This sequence...
     * sequenceByName("MY_SCHEMA", "MY_SEQUENCE");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_SEQUENCE]
     * 
* * @param qualifiedName The various parts making up your sequence's * reference name. * @param type The type of the returned field * @return A sequence referenced by sequenceName */ @Support public static Sequence sequenceByName(DataType type, String... qualifiedName) { if (qualifiedName == null) throw new NullPointerException(); if (qualifiedName.length < 1 || qualifiedName.length > 2) throw new IllegalArgumentException("Must provide a qualified name of length 1 or 2 : " + name(qualifiedName)); String name = qualifiedName[qualifiedName.length - 1]; Schema schema = qualifiedName.length == 2 ? schemaByName(qualifiedName[0]) : null; return new SequenceImpl(name, schema, type); } /** * Create a qualified table, given its table name. *

* This constructs a table reference given the table's qualified name. jOOQ * will render the table name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This table...
     * tableByName("MY_SCHEMA", "MY_TABLE");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_TABLE]
     * 
* * @param qualifiedName The various parts making up your table's reference * name. * @return A table referenced by tableName */ @Support public static Table tableByName(String... qualifiedName) { return new QualifiedTable(qualifiedName); } /** * Create a qualified field, given its (qualified) field name. *

* This constructs a field reference given the field's qualified name. jOOQ * will render the field name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This field...
     * fieldByName("MY_SCHEMA", "MY_TABLE", "MY_FIELD");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_TABLE].[MY_FIELD]
     * 
*

* Another example:

     * create.select(field("length({1})", Integer.class, fieldByName("TITLE")))
     *       .from(tableByName("T_BOOK"))
     *       .fetch();
     *
     * // ... will execute this SQL on SQL Server:
     * select length([TITLE]) from [T_BOOK]
     * 
* * @param qualifiedName The various parts making up your field's reference * name. * @return A field referenced by fieldName */ @Support public static Field fieldByName(String... qualifiedName) { return fieldByName(Object.class, qualifiedName); } /** * Create a qualified field, given its (qualified) field name. *

* This constructs a field reference given the field's qualified name. jOOQ * will render the field name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This field...
     * fieldByName("MY_SCHEMA", "MY_TABLE", "MY_FIELD");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_TABLE].[MY_FIELD]
     * 
*

* Another example:

     * create.select(field("length({1})", Integer.class, fieldByName("TITLE")))
     *       .from(tableByName("T_BOOK"))
     *       .fetch();
     *
     * // ... will execute this SQL on SQL Server:
     * select length([TITLE]) from [T_BOOK]
     * 
* * @param qualifiedName The various parts making up your field's reference * name. * @param type The type of the returned field * @return A field referenced by fieldName */ @Support public static Field fieldByName(Class type, String... qualifiedName) { return fieldByName(getDataType(type), qualifiedName); } /** * Create a qualified field, given its (qualified) field name. *

* This constructs a field reference given the field's qualified name. jOOQ * will render the field name according to your * {@link Settings#getRenderNameStyle()} settings. Choose * {@link RenderNameStyle#QUOTED} to prevent syntax errors and/or SQL * injection. *

* Example:

     * // This field...
     * fieldByName("MY_SCHEMA", "MY_TABLE", "MY_FIELD");
     *
     * // ... will render this SQL on SQL Server with RenderNameStyle.QUOTED set
     * [MY_SCHEMA].[MY_TABLE].[MY_FIELD]
     * 
*

* Another example:

     * create.select(field("length({1})", Integer.class, fieldByName("TITLE")))
     *       .from(tableByName("T_BOOK"))
     *       .fetch();
     *
     * // ... will execute this SQL on SQL Server:
     * select length([TITLE]) from [T_BOOK]
     * 
* * @param qualifiedName The various parts making up your field's reference * name. * @param type The type of the returned field * @return A field referenced by fieldName */ @Support public static Field fieldByName(DataType type, String... qualifiedName) { return new QualifiedField(type, qualifiedName); } // ------------------------------------------------------------------------- // XXX Plain SQL object factory // ------------------------------------------------------------------------- /** * Create a new {@link org.jooq.Template} that can transform parameter * objects into a {@link QueryPart}. * * @param sql The input SQL. * @return A template that can transform parameter objects into a * {@link QueryPart}. */ @SuppressWarnings("deprecation") static org.jooq.Template template(String sql) { return new SQLTemplate(sql); } /** * A custom SQL clause that can render arbitrary expressions. *

* A plain SQL QueryPart is a QueryPart that can * contain user-defined plain SQL, because sometimes it is easier to express * things directly in SQL. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A query part wrapping the plain SQL */ @Support public static QueryPart queryPart(String sql) { return queryPart(template(sql), new Object[0]); } /** * A custom SQL clause that can render arbitrary expressions. *

* A plain SQL QueryPart is a QueryPart that can * contain user-defined plain SQL, because sometimes it is easier to express * things directly in SQL. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A query part wrapping the plain SQL */ @Support public static QueryPart queryPart(String sql, QueryPart... parts) { return queryPart(template(sql), (Object[]) parts); } /** * A custom SQL clause that can render arbitrary expressions. *

* A plain SQL QueryPart is a QueryPart that can * contain user-defined plain SQL, because sometimes it is easier to express * things directly in SQL. There must be as many binding variables contained * in the SQL, as passed in the bindings parameter *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A query part wrapping the plain SQL */ @Support public static QueryPart queryPart(String sql, Object... bindings) { return queryPart(template(sql), bindings); } /** * A custom SQL clause that can render arbitrary expressions from a * template. * * @param template The template generating a delegate query part * @param parameters The parameters provided to the template * @return A query part wrapping the plain SQL */ @SuppressWarnings("deprecation") @Support static QueryPart queryPart(org.jooq.Template template, Object... parameters) { return template.transform(parameters); } // ------------------------------------------------------------------------- // XXX Plain SQL API // ------------------------------------------------------------------------- /** * Create a new query holding plain SQL. There must not be any binding * variables contained in the SQL. *

* Example: *

*

     * String sql = "SET SCHEMA 'abc'";
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A query wrapping the plain SQL */ @Support public static Query query(String sql) { return using(new DefaultConfiguration()).query(sql); } /** * Create a new query holding plain SQL. There must be as many bind * variables contained in the SQL, as passed in the bindings parameter. *

* Example: *

*

     * String sql = "SET SCHEMA 'abc'";
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param bindings The bindings * @return A query wrapping the plain SQL */ @Support public static Query query(String sql, Object... bindings) { return using(new DefaultConfiguration()).query(sql, bindings); } /** * Create a new query holding plain SQL. *

* Unlike {@link #query(String, Object...)}, the SQL passed to this method * should not contain any bind variables. Instead, you can pass * {@link QueryPart} objects to the method which will be rendered at indexed * locations of your SQL string as such:

     * // The following query
     * query("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
     *
     * // Will render this SQL on an Oracle database with RenderNameStyle.QUOTED:
     * select ?, 'test' from "DUAL"
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! One way to escape * literals is to use {@link DSL#name(String...)} and similar methods * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A query wrapping the plain SQL */ @Support public static Query query(String sql, QueryPart... parts) { return using(new DefaultConfiguration()).query(sql, parts); } /** * Create a new query holding plain SQL. *

* There must not be any binding variables contained in the SQL *

* Use this method, when you want to take advantage of the many ways to * fetch results in jOOQ, using {@link ResultQuery}. Some examples: *

*

* * * * * * * * * * * * *
{@link ResultQuery#fetchLazy()}Open a cursor and fetch records one by one
{@link ResultQuery#fetchInto(Class)}Fetch records into a custom POJO (optionally annotated with JPA * annotations)
{@link ResultQuery#fetchInto(RecordHandler)}Fetch records into a custom callback (similar to Spring's RowMapper)
*

* Example (Postgres): *

*

     * String sql = "FETCH ALL IN \"\"";
Example * (SQLite): *

*

     * String sql = "pragma table_info('my_table')";
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return An executable query */ @Support public static ResultQuery resultQuery(String sql) { return using(new DefaultConfiguration()).resultQuery(sql); } /** * Create a new query holding plain SQL. *

* There must be as many bind variables contained in the SQL, as passed in * the bindings parameter *

* Use this method, when you want to take advantage of the many ways to * fetch results in jOOQ, using {@link ResultQuery}. Some examples: *

*

* * * * * * * * * * * * *
{@link ResultQuery#fetchLazy()}Open a cursor and fetch records one by one
{@link ResultQuery#fetchInto(Class)}Fetch records into a custom POJO (optionally annotated with JPA * annotations)
{@link ResultQuery#fetchInto(RecordHandler)}Fetch records into a custom callback (similar to Spring's RowMapper)
*

* Example (Postgres): *

*

     * String sql = "FETCH ALL IN \"\"";
Example * (SQLite): *

*

     * String sql = "pragma table_info('my_table')";
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param bindings The bindings * @return A query wrapping the plain SQL */ @Support public static ResultQuery resultQuery(String sql, Object... bindings) { return using(new DefaultConfiguration()).resultQuery(sql, bindings); } /** * Create a new query holding plain SQL. *

* Unlike {@link #resultQuery(String, Object...)}, the SQL passed to this * method should not contain any bind variables. Instead, you can pass * {@link QueryPart} objects to the method which will be rendered at indexed * locations of your SQL string as such:

     * // The following query
     * resultQuery("select {0}, {1} from {2}", val(1), inline("test"), name("DUAL"));
     *
     * // Will render this SQL on an Oracle database with RenderNameStyle.QUOTED:
     * select ?, 'test' from "DUAL"
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! One way to escape * literals is to use {@link DSL#name(String...)} and similar methods * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A query wrapping the plain SQL */ @Support public static ResultQuery resultQuery(String sql, QueryPart... parts) { return using(new DefaultConfiguration()).resultQuery(sql, parts); } /** * A custom SQL clause that can render arbitrary table expressions. *

* A plain SQL table is a table that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex, but static subqueries or tables from different schemas. *

* Example *

*

     * String sql = "SELECT * FROM USER_TABLES WHERE OWNER = 'MY_SCHEMA'";
     * 
*

* The provided SQL must evaluate as a table whose type can be dynamically * discovered using JDBC's {@link ResultSetMetaData} methods. That way, you * can be sure that calling methods, such as {@link Table#fieldsRow()} will * list the actual fields returned from your result set. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A table wrapping the plain SQL */ @Support public static Table table(String sql) { return table(sql, new Object[0]); } /** * A custom SQL clause that can render arbitrary table expressions. *

* A plain SQL table is a table that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex, but static subqueries or tables from different schemas. * There must be as many binding variables contained in the SQL, as passed * in the bindings parameter *

* Example *

*

     * String sql = "SELECT * FROM USER_TABLES WHERE OWNER = ?";
     * Object[] bindings = new Object[] { "MY_SCHEMA" };
     * 
*

* The provided SQL must evaluate as a table whose type can be dynamically * discovered using JDBC's {@link ResultSetMetaData} methods. That way, you * can be sure that calling methods, such as {@link Table#fieldsRow()} will * list the actual fields returned from your result set. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A table wrapping the plain SQL */ @Support public static Table table(String sql, Object... bindings) { return table(template(sql), bindings); } /** * A custom SQL clause that can render arbitrary table expressions. *

* A plain SQL table is a table that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex, but static subqueries or tables from different schemas. *

* Example *

*

     * String sql = "SELECT * FROM USER_TABLES WHERE {0}";
     * QueryPart[] parts = new QueryPart[] { USER_TABLES.OWNER.equal("MY_SCHEMA") };
     * 
*

* The provided SQL must evaluate as a table whose type can be dynamically * discovered using JDBC's {@link ResultSetMetaData} methods. That way, you * can be sure that calling methods, such as {@link Table#fieldsRow()} will * list the actual fields returned from your result set. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A table wrapping the plain SQL */ @Support public static Table table(String sql, QueryPart... parts) { return table(template(sql), (Object[]) parts); } /** * A custom SQL clause that can render arbitrary table expressions from a * template. * * @param template The template generating a delegate query part * @param parameters The parameters provided to the template * @return A query part wrapping the plain SQL */ @SuppressWarnings("deprecation") @Support static Table table(org.jooq.Template template, Object... parameters) { return new SQLTable(queryPart(template, parameters)); } /** * Create a "plain SQL" sequence. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A field wrapping the plain SQL */ @Support public static Sequence sequence(String sql) { return sequence(sql, BigInteger.class); } /** * Create a "plain SQL" sequence. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param type The field type * @return A field wrapping the plain SQL */ @Support public static Sequence sequence(String sql, Class type) { return sequence(sql, getDataType(type)); } /** * Create a "plain SQL" sequence. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param type The field type * @return A field wrapping the plain SQL */ @Support public static Sequence sequence(String sql, DataType type) { return new SequenceImpl(sql, null, type, true); } /** * Create a "plain SQL" field. *

* A PlainSQLField is a field that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex proprietary functions. There must not be any binding * variables contained in the SQL. *

* Example: *

*

     * String sql = "DECODE(MY_FIELD, 1, 100, 200)";
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A field wrapping the plain SQL */ @Support public static Field field(String sql) { return field(template(sql), new Object[0]); } /** * Create a "plain SQL" field. *

* A PlainSQLField is a field that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex proprietary functions. There must be as many binding * variables contained in the SQL, as passed in the bindings parameter *

* Example: *

*

     * String sql = "DECODE(MY_FIELD, ?, ?, ?)";
     * Object[] bindings = new Object[] { 1, 100, 200 };
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param bindings The bindings for the field * @return A field wrapping the plain SQL */ @Support public static Field field(String sql, Object... bindings) { return field(template(sql), Object.class, bindings); } /** * Create a "plain SQL" field. *

* A PlainSQLField is a field that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex proprietary functions. There must not be any binding * variables contained in the SQL. *

* Example: *

*

     * String sql = "DECODE(MY_FIELD, 1, 100, 200)";
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param type The field type * @return A field wrapping the plain SQL */ @Support public static Field field(String sql, Class type) { return field(template(sql), type, new Object[0]); } /** * Create a "plain SQL" field. *

* A PlainSQLField is a field that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex proprietary functions. There must be as many binding * variables contained in the SQL, as passed in the bindings parameter *

* Example: *

*

     * String sql = "DECODE(MY_FIELD, ?, ?, ?)";
     * Object[] bindings = new Object[] { 1, 100, 200 };
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param type The field type * @param bindings The bindings for the field * @return A field wrapping the plain SQL */ @Support public static Field field(String sql, Class type, Object... bindings) { return field(template(sql), getDataType(type), bindings); } /** * Create a "plain SQL" field. *

* A PlainSQLField is a field that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex proprietary functions. There must not be any binding * variables contained in the SQL. *

* Example: *

*

     * String sql = "DECODE(MY_FIELD, 1, 100, 200)";
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param type The field type * @return A field wrapping the plain SQL */ @Support public static Field field(String sql, DataType type) { return field(template(sql), type, new Object[0]); } /** * Create a "plain SQL" field. *

* A PlainSQLField is a field that can contain user-defined plain SQL, * because sometimes it is easier to express things directly in SQL, for * instance complex proprietary functions. There must be as many binding * variables contained in the SQL, as passed in the bindings parameter *

* Example: *

*

     * String sql = "DECODE(MY_FIELD, ?, ?, ?)";
     * Object[] bindings = new Object[] { 1, 100, 200 };
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param type The field type * @param bindings The bindings for the field * @return A field wrapping the plain SQL */ @Support public static Field field(String sql, DataType type, Object... bindings) { return field(template(sql), type, bindings); } /** * A custom SQL clause that can render arbitrary SQL elements. *

* This is useful for constructing more complex SQL syntax elements wherever * Field types are expected. An example for this is MySQL's * GROUP_CONCAT aggregate function, which has MySQL-specific * keywords that are hard to reflect in jOOQ's DSL:

     * GROUP_CONCAT([DISTINCT] expr [,expr ...]
     *       [ORDER BY {unsigned_integer | col_name | expr}
     *           [ASC | DESC] [,col_name ...]]
     *       [SEPARATOR str_val])
     *       
*

* The above MySQL function can be expressed as such:

     * field("GROUP_CONCAT(DISTINCT {0} ORDER BY {1} ASC DEPARATOR '-')", expr1, expr2);
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! One way to escape * literals is to use {@link #name(String...)} and similar methods * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A field wrapping the plain SQL */ public static Field field(String sql, QueryPart... parts) { return field(template(sql), (Object[]) parts); } /** * A custom SQL clause that can render arbitrary SQL elements. *

* This is useful for constructing more complex SQL syntax elements wherever * Field types are expected. An example for this is MySQL's * GROUP_CONCAT aggregate function, which has MySQL-specific * keywords that are hard to reflect in jOOQ's DSL:

     * GROUP_CONCAT([DISTINCT] expr [,expr ...]
     *       [ORDER BY {unsigned_integer | col_name | expr}
     *           [ASC | DESC] [,col_name ...]]
     *       [SEPARATOR str_val])
     *       
*

* The above MySQL function can be expressed as such:

     * field("GROUP_CONCAT(DISTINCT {0} ORDER BY {1} ASC DEPARATOR '-')", expr1, expr2);
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! One way to escape * literals is to use {@link #name(String...)} and similar methods * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param type The field type * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A field wrapping the plain SQL */ public static Field field(String sql, Class type, QueryPart... parts) { return field(template(sql), type, (Object[]) parts); } /** * A custom SQL clause that can render arbitrary SQL elements. *

* This is useful for constructing more complex SQL syntax elements wherever * Field types are expected. An example for this is MySQL's * GROUP_CONCAT aggregate function, which has MySQL-specific * keywords that are hard to reflect in jOOQ's DSL:

     * GROUP_CONCAT([DISTINCT] expr [,expr ...]
     *       [ORDER BY {unsigned_integer | col_name | expr}
     *           [ASC | DESC] [,col_name ...]]
     *       [SEPARATOR str_val])
     *       
*

* The above MySQL function can be expressed as such:

     * field("GROUP_CONCAT(DISTINCT {0} ORDER BY {1} ASC DEPARATOR '-')", expr1, expr2);
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! One way to escape * literals is to use {@link #name(String...)} and similar methods * * @param sql The SQL clause, containing {numbered placeholders} where query * parts can be injected * @param type The field type * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A field wrapping the plain SQL */ public static Field field(String sql, DataType type, QueryPart... parts) { return field(template(sql), type, (Object[]) parts); } /** * A custom SQL clause that can render arbitrary field expressions from a * template. * * @param template The template generating a delegate query part * @param parameters The parameters provided to the template * @return A query part wrapping the plain SQL */ @SuppressWarnings("deprecation") @Support static Field field(org.jooq.Template template, Object... parameters) { return field(template, Object.class, parameters); } /** * A custom SQL clause that can render arbitrary field expressions from a * template. * * @param template The template generating a delegate query part * @param type The field type * @param parameters The parameters provided to the template * @return A query part wrapping the plain SQL */ @SuppressWarnings("deprecation") @Support static Field field(org.jooq.Template template, Class type, Object... parameters) { return field(template, getDataType(type), parameters); } /** * A custom SQL clause that can render arbitrary field expressions from a * template. * * @param template The template generating a delegate query part * @param type The field type * @param parameters The parameters provided to the template * @return A query part wrapping the plain SQL */ @SuppressWarnings("deprecation") @Support static Field field(org.jooq.Template template, DataType type, Object... parameters) { return new SQLField(type, queryPart(template, parameters)); } /** * function() can be used to access native or user-defined * functions that are not yet or insufficiently supported by jOOQ. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param name The function name (without parentheses) * @param type The function return type * @param arguments The function arguments */ @Support public static Field function(String name, Class type, Field... arguments) { return function(name, getDataType(type), nullSafe(arguments)); } /** * function() can be used to access native or user-defined * functions that are not yet or insufficiently supported by jOOQ. *

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param name The function name (without parentheses) * @param type The function return type * @param arguments The function arguments */ @Support public static Field function(String name, DataType type, Field... arguments) { return new Function(name, type, nullSafe(arguments)); } /** * function() can be used to access native or user-defined * functions that are not yet or insufficiently supported by jOOQ. * * @param name The function name (possibly qualified) * @param type The function return type * @param arguments The function arguments */ @Support public static Field function(Name name, Class type, Field... arguments) { return function(name, getDataType(type), nullSafe(arguments)); } /** * function() can be used to access native or user-defined * functions that are not yet or insufficiently supported by jOOQ. * * @param name The function name (possibly qualified) * @param type The function return type * @param arguments The function arguments */ @Support public static Field function(Name name, DataType type, Field... arguments) { return new Function(name, type, nullSafe(arguments)); } /** * Create a new condition holding plain SQL. *

* There must not be any binding variables contained in the SQL. *

* Example: *

*

     * String sql = "(X = 1 and Y = 2)";
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @return A condition wrapping the plain SQL */ @Support public static Condition condition(String sql) { return condition(template(sql), new Object[0]); } /** * Create a new condition holding plain SQL. *

* There must be as many binding variables contained in the SQL, as passed * in the bindings parameter *

* Example: *

*

     * String sql = "(X = ? and Y = ?)";
     * Object[] bindings = new Object[] { 1, 2 };
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! * * @param sql The SQL * @param bindings The bindings * @return A condition wrapping the plain SQL */ @Support public static Condition condition(String sql, Object... bindings) { return condition(template(sql), bindings); } /** * A custom SQL clause that can render arbitrary SQL elements. *

* This is useful for constructing more complex SQL syntax elements wherever * Condition types are expected. An example for this are * Postgres's various operators, some of which are missing in the jOOQ API. * For instance, the "overlap" operator for arrays: *

ARRAY[1,4,3] && ARRAY[2,1]
*

* The above Postgres operator can be expressed as such:

     * condition("{0} && {1}", array1, array2);
     * 
*

* NOTE: When inserting plain SQL into jOOQ objects, you must * guarantee syntax integrity. You may also create the possibility of * malicious SQL injection. Be sure to properly use bind variables and/or * escape literals when concatenated into SQL clauses! One way to escape * literals is to use {@link #name(String...)} and similar methods * * @param sql The SQL * @param parts The {@link QueryPart} objects that are rendered at the * {numbered placeholder} locations * @return A condition wrapping the plain SQL */ @Support public static Condition condition(String sql, QueryPart... parts) { return condition(template(sql), (Object[]) parts); } /** * A custom SQL clause that can render arbitrary condition expressions from * a template. * * @param template The template generating a delegate query part * @param parameters The parameters provided to the template * @return A query part wrapping the plain SQL */ @SuppressWarnings("deprecation") @Support static Condition condition(org.jooq.Template template, Object... parameters) { return new SQLCondition(queryPart(template, parameters)); } /** * Create a condition from a boolean field. *

* Databases that support boolean data types can use boolean expressions * as predicates or as columns interchangeably. This extends to any type * of field, including functions. A Postgres example: *

*

     * select 1 where texteq('a', 'a');
     * 
* * @param value The boolean expression. * @return A condition wrapping the boolean expression */ @Support public static Condition condition(Boolean value) { return condition(Utils.field(value, Boolean.class)); } /** * Create a condition from a boolean field. *

* Databases that support boolean data types can use boolean expressions * as predicates or as columns interchangeably. This extends to any type * of field, including functions. A Postgres example: *

*

     * select 1 where texteq('a', 'a');
     * 
* * @param field The boolean expression. * @return A condition wrapping the boolean expression */ @Support public static Condition condition(Field field) { return new FieldCondition(field); } // ------------------------------------------------------------------------- // XXX Global Condition factory // ------------------------------------------------------------------------- /** * Return a Condition that will always evaluate to true. */ @Support public static Condition trueCondition() { return new TrueCondition(); } /** * Return a Condition that will always evaluate to false. */ @Support public static Condition falseCondition() { return new FalseCondition(); } /** * Create an exists condition. *

* EXISTS ([query]) */ @Support public static Condition exists(Select query) { return new ExistsCondition(query, true); } /** * Create a not exists condition. *

* NOT EXISTS ([query]) */ @Support public static Condition notExists(Select query) { return new ExistsCondition(query, false); } /** * Invert a condition. *

* This is the same as calling {@link Condition#not()} */ @Support public static Condition not(Condition condition) { return condition.not(); } /** * Invert a boolean value. *

* This is convenience for calling {@link #field(Condition)}, * {@link #not(Condition)}, {@link #condition(Field)}, i.e.

     * field(not(condition(field)));
     * 
*/ @Support public static Field not(Boolean value) { return not(Utils.field(value, Boolean.class)); } /** * Invert a boolean value. *

* This is convenience for calling {@link #field(Condition)}, * {@link #not(Condition)}, {@link #condition(Field)}, i.e.

     * field(not(condition(field)));
     * 
*/ @Support public static Field not(Field field) { return new NotField(field); } /** * Transform a condition into a boolean field. */ @Support public static Field field(Condition condition) { return new ConditionAsField(condition); } // ------------------------------------------------------------------------- // XXX Global Field and Function factory // ------------------------------------------------------------------------- /** * Transform a subquery into a correlated subquery. */ @Support public static Field field(Select> select) { return select.asField(); } /** * Initialise a {@link Case} statement. *

* Decode is used as a method name to avoid name clashes with Java's * reserved literal "case" * * @see Case */ @Support public static Case decode() { return new CaseImpl(); } /** * Gets the Oracle-style * DECODE(expression, search, result[, search , result]... [, default]) * function. * * @see #decode(Field, Field, Field, Field[]) */ @Support public static Field decode(T value, T search, Z result) { return decode(value, search, result, new Object[0]); } /** * Gets the Oracle-style * DECODE(expression, search, result[, search , result]... [, default]) * function. * * @see #decode(Field, Field, Field, Field[]) */ @Support public static Field decode(T value, T search, Z result, Object... more) { return decode(Utils.field(value), Utils.field(search), Utils.field(result), Utils.fields(more).toArray(new Field[0])); } /** * Gets the Oracle-style * DECODE(expression, search, result[, search , result]... [, default]) * function. * * @see #decode(Field, Field, Field, Field[]) */ @Support public static Field decode(Field value, Field search, Field result) { return decode(nullSafe(value), nullSafe(search), nullSafe(result), new Field[0]); } /** * Gets the Oracle-style * DECODE(expression, search, result[, search , result]... [, default]) * function. *

* Returns the dialect's equivalent to DECODE: *

*

* Other dialects:

     * CASE WHEN [this IS NOT DISTINCT FROM search] THEN [result],
     *     [WHEN more...                            THEN more...]
     *     [ELSE more...]
     * END
     * 
*

* Note the use of the DISTINCT predicate to produce the same, * conveniently NULL-agnostic behaviour as Oracle. * * @param value The value to decode * @param search the mandatory first search parameter * @param result the mandatory first result candidate parameter * @param more the optional parameters. If more.length is even, * then it is assumed that it contains more search/result pairs. * If more.length is odd, then it is assumed that it * contains more search/result pairs plus a default at the end. */ @Support public static Field decode(Field value, Field search, Field result, Field... more) { return new Decode(nullSafe(value), nullSafe(search), nullSafe(result), nullSafe(more)); } /** * Coerce this field to the type of another field. * * @see #coerce(Field, Field) */ @Support public static Field coerce(Object value, Field as) { return Utils.field(value).coerce(as); } /** * Coerce this field to another type. * * @see #coerce(Field, Class) */ @Support public static Field coerce(Object value, Class as) { return Utils.field(value).coerce(as); } /** * Coerce a field to another type. * * @see #coerce(Field, DataType) */ @Support public static Field coerce(Object value, DataType as) { return Utils.field(value).coerce(as); } /** * Coerce this field to the type of another field. *

* Unlike with casting, coercing doesn't affect the way the database sees a * Field's type. This is how coercing affects your SQL: *

Bind values

     * // This binds an int value to a JDBC PreparedStatement
     * DSL.val(1).coerce(String.class);
     *
     * // This binds an int value to a JDBC PreparedStatement
     * // and casts it to VARCHAR in SQL
     * DSL.val(1).cast(String.class);
     * 
*

Other Field types

     * // This fetches a String value for the BOOK.ID field from JDBC
     * BOOK.ID.coerce(String.class);
     *
     * // This fetches a String value for the BOOK.ID field from JDBC
     * // after casting it to VARCHAR in the database
     * BOOK.ID.cast(String.class);
     * 
* * @param The generic type of the coerced field * @param field The field to be coerced * @param as The field whose type is used for the coercion * @return The coerced field * @see Field#coerce(DataType) * @see Field#cast(Field) */ @Support public static Field coerce(Field field, Field as) { return nullSafe(field).coerce(as); } /** * Coerce this field to another type. *

* Unlike with casting, coercing doesn't affect the way the database sees a * Field's type. This is how coercing affects your SQL: *

Bind values

     * // This binds an int value to a JDBC PreparedStatement
     * DSL.val(1).coerce(String.class);
     *
     * // This binds an int value to a JDBC PreparedStatement
     * // and casts it to VARCHAR in SQL
     * DSL.val(1).cast(String.class);
     * 
*

Other Field types

     * // This fetches a String value for the BOOK.ID field from JDBC
     * BOOK.ID.coerce(String.class);
     *
     * // This fetches a String value for the BOOK.ID field from JDBC
     * // after casting it to VARCHAR in the database
     * BOOK.ID.cast(String.class);
     * 
* * @param The generic type of the coerced field * @param field The field to be coerced * @param as The type that is used for the coercion * @return The coerced field * @see Field#coerce(DataType) * @see Field#cast(Class) */ @Support public static Field coerce(Field field, Class as) { return nullSafe(field).coerce(as); } /** * Coerce a field to another type. *

* Unlike with casting, coercing doesn't affect the way the database sees a * Field's type. This is how coercing affects your SQL: *

Bind values

     * // This binds an int value to a JDBC PreparedStatement
     * DSL.val(1).coerce(String.class);
     *
     * // This binds an int value to a JDBC PreparedStatement
     * // and casts it to VARCHAR in SQL
     * DSL.val(1).cast(String.class);
     * 
*

Other Field types

     * // This fetches a String value for the BOOK.ID field from JDBC
     * BOOK.ID.coerce(String.class);
     *
     * // This fetches a String value for the BOOK.ID field from JDBC
     * // after casting it to VARCHAR in the database
     * BOOK.ID.cast(String.class);
     * 
* * @param The generic type of the coerced field * @param field The field to be coerced * @param as The type that is used for the coercion * @return The coerced field * @see Field#coerce(DataType) * @see Field#cast(DataType) */ @Support public static Field coerce(Field field, DataType as) { return nullSafe(field).coerce(as); } /** * Cast a value to the type of another field. * * @param The generic type of the cast field * @param value The value to cast * @param as The field whose type is used for the cast * @return The cast field */ @Support public static Field cast(Object value, Field as) { return Utils.field(value, as).cast(as); } /** * Cast a field to the type of another field. * * @param The generic type of the cast field * @param field The field to cast * @param as The field whose type is used for the cast * @return The cast field */ @Support public static Field cast(Field field, Field as) { return nullSafe(field).cast(as); } /** * Cast null to the type of another field. * * @param The generic type of the cast field * @param as The field whose type is used for the cast * @return The cast field */ @Support public static Field castNull(Field as) { return NULL().cast(as); } /** * Cast a value to another type. * * @param The generic type of the cast field * @param value The value to cast * @param type The type that is used for the cast * @return The cast field */ @Support public static Field cast(Object value, Class type) { return Utils.field(value, type).cast(type); } /** * Cast a field to another type. * * @param The generic type of the cast field * @param field The field to cast * @param type The type that is used for the cast * @return The cast field */ @Support public static Field cast(Field field, Class type) { return nullSafe(field).cast(type); } /** * Cast null to a type. * * @param The generic type of the cast field * @param type The type that is used for the cast * @return The cast field */ @Support public static Field castNull(DataType type) { return NULL().cast(type); } /** * Cast a value to another type. * * @param The generic type of the cast field * @param value The value to cast * @param type The type that is used for the cast * @return The cast field */ @Support public static Field cast(Object value, DataType type) { return Utils.field(value, type).cast(type); } /** * Cast a field to another type. * * @param The generic type of the cast field * @param field The value to cast * @param type The type that is used for the cast * @return The cast field */ @Support public static Field cast(Field field, DataType type) { return nullSafe(field).cast(type); } /** * Cast null to a type. * * @param The generic type of the cast field * @param type The type that is used for the cast * @return The cast field */ @Support public static Field castNull(Class type) { return NULL().cast(type); } /** * Cast all fields that need casting. * * @param The generic field type * @param type The type to cast to * @param fields The fields to be cast to a uniform type * @return The cast fields */ static Field[] castAll(Class type, Field... fields) { Field[] castFields = new Field[fields.length]; for (int i = 0; i < fields.length; i++) { castFields[i] = fields[i].cast(type); } return (Field[]) castFields; } /** * Gets the Oracle-style COALESCE(value1, value2, ... , value n) * function. * * @see #coalesce(Field, Field...) */ @Support public static Field coalesce(T value, T... values) { return coalesce(Utils.field(value), Utils.fields(values).toArray(new Field[0])); } /** * Gets the Oracle-style COALESCE(field1, field2, ... , field n) * function. *

* Returns the dialect's equivalent to COALESCE: *

*/ @Support public static Field coalesce(Field field, Field... fields) { return new Coalesce(nullSafeDataType(field), nullSafe(combine(field, fields))); } /** * Gets the SQL Server-style ISNULL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field isnull(T value, T defaultValue) { return nvl(value, defaultValue); } /** * Gets the SQL Server-style ISNULL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field isnull(T value, Field defaultValue) { return nvl(value, defaultValue); } /** * Gets the SQL Server-style ISNULL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field isnull(Field value, T defaultValue) { return nvl(value, defaultValue); } /** * Gets the SQL Server-style ISNULL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field isnull(Field value, Field defaultValue) { return nvl(value, defaultValue); } /** * Gets the Oracle-style NVL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field nvl(T value, T defaultValue) { return nvl(Utils.field(value), Utils.field(defaultValue)); } /** * Gets the Oracle-style NVL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field nvl(T value, Field defaultValue) { return nvl(Utils.field(value), nullSafe(defaultValue)); } /** * Gets the Oracle-style NVL(value, defaultValue) function. * * @see #nvl(Field, Field) */ @Support public static Field nvl(Field value, T defaultValue) { return nvl(nullSafe(value), Utils.field(defaultValue)); } /** * Gets the Oracle-style NVL(value, defaultValue) function. *

* Returns the dialect's equivalent to NVL: *

*/ @Support public static Field nvl(Field value, Field defaultValue) { return new Nvl(nullSafe(value), nullSafe(defaultValue)); } /** * Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function. * * @see #nvl2(Field, Field, Field) */ @Support public static Field nvl2(Field value, Z valueIfNotNull, Z valueIfNull) { return nvl2(nullSafe(value), Utils.field(valueIfNotNull), Utils.field(valueIfNull)); } /** * Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function. * * @see #nvl2(Field, Field, Field) */ @Support public static Field nvl2(Field value, Z valueIfNotNull, Field valueIfNull) { return nvl2(nullSafe(value), Utils.field(valueIfNotNull), nullSafe(valueIfNull)); } /** * Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function. * * @see #nvl2(Field, Field, Field) */ @Support public static Field nvl2(Field value, Field valueIfNotNull, Z valueIfNull) { return nvl2(nullSafe(value), nullSafe(valueIfNotNull), Utils.field(valueIfNull)); } /** * Gets the Oracle-style NVL2(value, valueIfNotNull, valueIfNull) function. *

* Returns the dialect's equivalent to NVL2: *

*

* Other dialects: * CASE WHEN [value] IS NULL THEN [valueIfNull] ELSE [valueIfNotNull] END */ @Support public static Field nvl2(Field value, Field valueIfNotNull, Field valueIfNull) { return new Nvl2(nullSafe(value), nullSafe(valueIfNotNull), nullSafe(valueIfNull)); } /** * Gets the Oracle-style NULLIF(value, other) function. * * @see #nullif(Field, Field) */ @Support public static Field nullif(T value, T other) { return nullif(Utils.field(value), Utils.field(other)); } /** * Gets the Oracle-style NULLIF(value, other) function. * * @see #nullif(Field, Field) */ @Support public static Field nullif(T value, Field other) { return nullif(Utils.field(value), nullSafe(other)); } /** * Gets the Oracle-style NULLIF(value, other) function. * * @see #nullif(Field, Field) */ @Support public static Field nullif(Field value, T other) { return nullif(nullSafe(value), Utils.field(other)); } /** * Gets the Oracle-style NULLIF(value, other) function. *

* Returns the dialect's equivalent to NULLIF: *

*

*/ @Support public static Field nullif(Field value, Field other) { return new NullIf(nullSafe(value), nullSafe(other)); } // ------------------------------------------------------------------------- // XXX String function factory // ------------------------------------------------------------------------- /** * Get the upper(field) function. * * @see #upper(Field) */ @Support public static Field upper(String value) { return upper(Utils.field(value)); } /** * Get the upper(field) function. *

* This renders the upper function in all dialects: *

upper([field])
*/ @Support public static Field upper(Field field) { return new Upper(nullSafe(field)); } /** * Get the lower(field) function. * * @see #lower(Field) */ @Support public static Field lower(String value) { return lower(Utils.field(value, String.class)); } /** * Get the lower(field) function. *

* This renders the lower function in all dialects: *

lower([field])
*/ @Support public static Field lower(Field field) { return new Lower(nullSafe(field)); } /** * Get the trim(field) function. * * @see #trim(Field) */ @Support public static Field trim(String value) { return trim(Utils.field(value, String.class)); } /** * Get the trim(field) function. *

* This renders the trim function where available: *

trim([field])
... or simulates it elsewhere using * rtrim and ltrim:
ltrim(rtrim([field]))
*/ @Support public static Field trim(Field field) { return new Trim(nullSafe(field)); } /** * Get the rtrim(field) function. * * @see #rtrim(Field) */ @Support public static Field rtrim(String value) { return rtrim(Utils.field(value)); } /** * Get the rtrim(field) function. *

* This renders the rtrim function in all dialects: *

rtrim([field])
*/ @Support public static Field rtrim(Field field) { return new RTrim(nullSafe(field)); } /** * Get the ltrim(field) function. * * @see #ltrim(Field) */ @Support public static Field ltrim(String value) { return ltrim(Utils.field(value, String.class)); } /** * Get the ltrim(field) function. *

* This renders the ltrim function in all dialects: *

ltrim([field])
*/ @Support public static Field ltrim(Field field) { return new LTrim(nullSafe(field)); } /** * Get the rpad(field, length) function. * * @see #rpad(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field rpad(Field field, int length) { return rpad(nullSafe(field), Utils.field(length)); } /** * Get the rpad(field, length) function. *

* This renders the rpad function where available: *

rpad([field], [length])
... or simulates it * elsewhere using concat, repeat, and length, which may be simulated as * well, depending on the RDBMS: *
concat([field], repeat(' ', [length] - length([field])))
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field rpad(Field field, Field length) { return new Rpad(nullSafe(field), nullSafe(length)); } /** * Get the rpad(field, length, character) function. * * @see #rpad(Field, Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field rpad(Field field, int length, char character) { return rpad(field, length, Character.toString(character)); } /** * Get the rpad(field, length, character) function. * * @see #rpad(Field, Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field rpad(Field field, int length, String character) { return rpad(nullSafe(field), Utils.field(length), Utils.field(character, String.class)); } /** * Get the rpad(field, length, character) function. *

* This renders the rpad function where available: *

rpad([field], [length])
... or simulates it * elsewhere using concat, repeat, and length, which may be simulated as * well, depending on the RDBMS: *
concat([field], repeat([character], [length] - length([field])))
*

* In {@link SQLDialect#SQLITE}, this is simulated as such: *

[field] || replace(replace(substr(quote(zeroblob(([length] + 1) / 2)), 3, ([length] - length([field]))), '''', ''), '0', [character])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field rpad(Field field, Field length, Field character) { return new Rpad(nullSafe(field), nullSafe(length), nullSafe(character)); } /** * Get the lpad(field, length) function. * * @see #lpad(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field lpad(Field field, int length) { return lpad(nullSafe(field), Utils.field(length)); } /** * Get the lpad(field, length) function. *

* This renders the lpad function where available: *

lpad([field], [length])
... or simulates it * elsewhere using concat, repeat, and length, which may be simulated as * well, depending on the RDBMS: *
concat(repeat(' ', [length] - length([field])), [field])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field lpad(Field field, Field length) { return new Lpad(nullSafe(field), nullSafe(length)); } /** * Get the lpad(field, length, character) function. * * @see #lpad(Field, Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field lpad(Field field, int length, char character) { return lpad(field, length, Character.toString(character)); } /** * Get the lpad(field, length, character) function. * * @see #lpad(Field, Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field lpad(Field field, int length, String character) { return lpad(nullSafe(field), Utils.field(length), Utils.field(character, String.class)); } /** * Get the lpad(field, length, character) function. *

* This renders the lpad function where available: *

lpad([field], [length])
... or simulates it * elsewhere using concat, repeat, and length, which may be simulated as * well, depending on the RDBMS: *
concat(repeat([character], [length] - length([field])), [field])
*

* In {@link SQLDialect#SQLITE}, this is simulated as such: *

replace(replace(substr(quote(zeroblob(([length] + 1) / 2)), 3, ([length] - length([field]))), '''', ''), '0', [character]) || [field]
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field lpad(Field field, Field length, Field character) { return new Lpad(nullSafe(field), nullSafe(length), nullSafe(character)); } /** * Get the repeat(field, count) function. * * @see #repeat(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field repeat(String field, int count) { return repeat(Utils.field(field, String.class), Utils.field(count)); } /** * Get the repeat(field, count) function. * * @see #repeat(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field repeat(String field, Field count) { return repeat(Utils.field(field, String.class), nullSafe(count)); } /** * Get the repeat(count) function. * * @see #repeat(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field repeat(Field field, int count) { return repeat(nullSafe(field), Utils.field(count)); } /** * Get the repeat(field, count) function. *

* This renders the repeat or replicate function where available: *

repeat([field], [count]) or
     * replicate([field], [count])
... or simulates it elsewhere * using rpad and length, which may be simulated as well, depending on the * RDBMS: *
rpad([field], length([field]) * [count], [field])
*

* In {@link SQLDialect#SQLITE}, this is simulated as such: *

replace(substr(quote(zeroblob(([count] + 1) / 2)), 3, [count]), '0', [field])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field repeat(Field field, Field count) { return new Repeat(nullSafe(field), nullSafe(count)); } /** * Get the SQL Server specific SPACE() function. *

* This function can be emulated using {@link #repeat(String, int)} in * dialects that do not ship with a native SPACE() function. * * @see http://technet.microsoft.com/en-us/library/ms187950.aspx */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field space(int value) { return space(val(value)); } /** * Get the SQL Server specific SPACE() function. *

* This function can be emulated using {@link #repeat(String, int)} in * dialects that do not ship with a native SPACE() function. * * @see http://technet.microsoft.com/en-us/library/ms187950.aspx */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field space(Field value) { return new Space(nullSafe(value)); } /** * Get the reverse(field) function. */ @Support({ CUBRID, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field reverse(String value) { return reverse(val(value)); } /** * Get the reverse(field) function. */ @Support({ CUBRID, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field reverse(Field field) { return new Reverse(nullSafe(field)); } /** * Convenience method for {@link #replace(Field, String, String)} to escape * data for use with {@link Field#like(Field, char)}. *

* Essentially, this escapes % and _ characters * * @see #replace(Field, String, String) * @see Field#like(Field, char) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static String escape(String value, char escape) { String esc = "" + escape; return value.replace(esc, esc + esc).replace("%", esc + "%").replace("_", esc + "_"); } /** * Convenience method for {@link #replace(Field, String, String)} to escape * data for use with {@link Field#like(Field, char)}. *

* Essentially, this escapes % and _ characters * * @see #replace(Field, String, String) * @see Field#like(Field, char) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field escape(Field field, char escape) { Field replace = field; String esc = "" + escape; replace = replace(replace, inline(esc), inline(esc + esc)); replace = replace(replace, inline("%"), inline(esc + "%")); replace = replace(replace, inline("_"), inline(esc + "_")); return replace; } /** * Get the replace(field, search) function. * * @see #replace(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field replace(Field field, String search) { return replace(nullSafe(field), Utils.field(search, String.class)); } /** * Get the replace(field, search) function. *

* This renders the replace or str_replace function where available: *

replace([field], [search]) or
     * str_replace([field], [search])
... or simulates it elsewhere * using the three-argument replace function: *
replace([field], [search], '')
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field replace(Field field, Field search) { return new Replace(nullSafe(field), nullSafe(search)); } /** * Get the replace(field, search, replace) function. * * @see #replace(Field, Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field replace(Field field, String search, String replace) { return replace(nullSafe(field), Utils.field(search, String.class), Utils.field(replace, String.class)); } /** * Get the replace(field, search, replace) function. *

* This renders the replace or str_replace function: *

replace([field], [search]) or
     * str_replace([field], [search])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field replace(Field field, Field search, Field replace) { return new Replace(nullSafe(field), nullSafe(search), nullSafe(replace)); } /** * Get the position(in, search) function. * * @see #position(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field position(String in, String search) { return position(Utils.field(in, String.class), Utils.field(search, String.class)); } /** * Get the position(in, search) function. * * @see #position(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field position(String in, Field search) { return position(Utils.field(in, String.class), nullSafe(search)); } /** * Get the position(in, search) function. * * @see #position(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field position(Field in, String search) { return position(nullSafe(in), Utils.field(search, String.class)); } /** * Get the position(in, search) function. *

* This renders the position or any equivalent function: *

position([search] in [in]) or
     * locate([in], [search]) or
     * locate([search], [in]) or
     * instr([in], [search]) or
     * charindex([search], [in])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field position(Field in, Field search) { return new Position(nullSafe(search), nullSafe(in)); } /** * Get the ascii(field) function. * * @see #ascii(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field ascii(String field) { return ascii(Utils.field(field, String.class)); } /** * Get the ascii(field) function. *

* This renders the ascii function: *

ascii([field])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field ascii(Field field) { return new Ascii(nullSafe(field)); } /** * Get the concat(field, value) function. * * @see #concat(Field...) */ @Support public static Field concat(Field field, String value) { return concat(nullSafe(field), Utils.field(value, String.class)); } /** * Get the concat(value, field) function. * * @see #concat(Field...) */ @Support public static Field concat(String value, Field field) { return concat(Utils.field(value, String.class), nullSafe(field)); } /** * Get the concat(value[, value, ...]) function. * * @see #concat(Field...) */ @Support public static Field concat(String... values) { return concat(Utils.fields(values).toArray(new Field[0])); } /** * Get the concat(field[, field, ...]) function. *

* This creates fields[0] || fields[1] || ... as an * expression, or concat(fields[0], fields[1], ...), * depending on the dialect. *

* If any of the given fields is not a {@link String} field, they are cast * to Field<String> first using {@link #cast(Object, Class)} */ @Support public static Field concat(Field... fields) { return new Concat(nullSafe(fields)); } /** * Get the substring(field, startingPosition) function. * * @see #substring(Field, Field) */ @Support public static Field substring(Field field, int startingPosition) { return substring(nullSafe(field), Utils.field(startingPosition)); } /** * Get the substring(field, startingPosition) function. *

* This renders the substr or substring function: *

substr([field], [startingPosition]) or
     * substring([field], [startingPosition])
*/ @Support public static Field substring(Field field, Field startingPosition) { return new Substring(nullSafe(field), nullSafe(startingPosition)); } /** * Get the substring(field, startingPosition, length) function. * * @see #substring(Field, Field, Field) */ @Support public static Field substring(Field field, int startingPosition, int length) { return substring(nullSafe(field), Utils.field(startingPosition), Utils.field(length)); } /** * Get the substring(field, startingPosition, length) function. *

* This renders the substr or substring function: *

substr([field], [startingPosition], [length]) or
     * substring([field], [startingPosition], [length])
*/ @Support public static Field substring(Field field, Field startingPosition, Field length) { return new Substring(nullSafe(field), nullSafe(startingPosition), nullSafe(length)); } /** * Get the mid(field, startingPosition, length) function. * * @see #substring(Field, Field, Field) */ @Support public static Field mid(Field field, int startingPosition, int length) { return substring(nullSafe(field), Utils.field(startingPosition), Utils.field(length)); } /** * Get the mid(field, startingPosition, length) function. *

* This renders the substr or substring function: *

substr([field], [startingPosition], [length]) or
     * substring([field], [startingPosition], [length])
*/ @Support public static Field mid(Field field, Field startingPosition, Field length) { return substring(nullSafe(field), nullSafe(startingPosition), nullSafe(length)); } /** * Get the left outermost characters from a string. *

* Example: *

     * 'abc' = LEFT('abcde', 3)
     * 
*/ @Support public static Field left(String field, int length) { return left(Utils.field(field), Utils.field(length)); } /** * Get the left outermost characters from a string. *

* Example: *

     * 'abc' = LEFT('abcde', 3)
     * 
*/ @Support public static Field left(String field, Field length) { return left(Utils.field(field), nullSafe(length)); } /** * Get the left outermost characters from a string. *

* Example: *

     * 'abc' = LEFT('abcde', 3)
     * 
*/ @Support public static Field left(Field field, int length) { return left(nullSafe(field), Utils.field(length)); } /** * Get the left outermost characters from a string. *

* Example: *

     * 'abc' = LEFT('abcde', 3)
     * 
*/ @Support public static Field left(Field field, Field length) { return new Left(field, length); } /** * Get the right outermost characters from a string. *

* Example: *

     * 'cde' = RIGHT('abcde', 3)
     * 
*/ @Support public static Field right(String field, int length) { return right(Utils.field(field), Utils.field(length)); } /** * Get the right outermost characters from a string. *

* Example: *

     * 'cde' = RIGHT('abcde', 3)
     * 
*/ @Support public static Field right(String field, Field length) { return right(Utils.field(field), nullSafe(length)); } /** * Get the right outermost characters from a string. *

* Example: *

     * 'cde' = RIGHT('abcde', 3)
     * 
*/ @Support public static Field right(Field field, int length) { return right(nullSafe(field), Utils.field(length)); } /** * Get the right outermost characters from a string. *

* Example: *

     * 'cde' = RIGHT('abcde', 3)
     * 
*/ @Support public static Field right(Field field, Field length) { return new Right(field, length); } /** * Get the length of a VARCHAR type. This is a synonym for * {@link #charLength(String)}. * * @see #charLength(String) */ @Support public static Field length(String value) { return length(Utils.field(value, String.class)); } /** * Get the length of a VARCHAR type. This is a synonym for * {@link #charLength(Field)}. * * @see #charLength(Field) */ @Support public static Field length(Field field) { return charLength(field); } /** * Get the char_length(field) function. *

* This translates into any dialect */ @Support public static Field charLength(String value) { return charLength(Utils.field(value)); } /** * Get the char_length(field) function. *

* This translates into any dialect */ @Support public static Field charLength(Field field) { return new Function(Term.CHAR_LENGTH, SQLDataType.INTEGER, nullSafe(field)); } /** * Get the bit_length(field) function. *

* This translates into any dialect */ @Support public static Field bitLength(String value) { return bitLength(Utils.field(value)); } /** * Get the bit_length(field) function. *

* This translates into any dialect */ @Support public static Field bitLength(Field field) { return new Function(Term.BIT_LENGTH, SQLDataType.INTEGER, nullSafe(field)); } /** * Get the octet_length(field) function. *

* This translates into any dialect */ @Support public static Field octetLength(String value) { return octetLength(Utils.field(value, String.class)); } /** * Get the octet_length(field) function. *

* This translates into any dialect */ @Support public static Field octetLength(Field field) { return new Function(Term.OCTET_LENGTH, SQLDataType.INTEGER, nullSafe(field)); } // ------------------------------------------------------------------------ // XXX Hash function factory // ------------------------------------------------------------------------ /** * Get the MySQL-specific MD5() function. *

* These are the implementations for various databases: *

*

* * * * * * * * * * * * *
DatabaseImplementation
MySQLMD5( ... )
Oracle * LOWER(RAWTOHEX(SYS.DBMS_CRYPTO.HASH(UTL_RAW.CAST_TO_RAW( ... ), SYS.DBMS_CRYPTO.HASH_MD5))) *
*/ @Support({ MARIADB, MYSQL }) public static Field md5(String string) { return md5(Utils.field(string)); } /** * Get the MySQL-specific MD5() function. *

* These are the implementations for various databases: *

*

* * * * * * * * * * * * *
DatabaseImplementation
MySQLMD5( ... )
Oracle * LOWER(RAWTOHEX(SYS.DBMS_CRYPTO.HASH(UTL_RAW.CAST_TO_RAW( ... ), SYS.DBMS_CRYPTO.HASH_MD5))) *
*/ @Support({ MARIADB, MYSQL }) public static Field md5(Field string) { return new MD5(nullSafe(string)); } // ------------------------------------------------------------------------ // XXX Date and time functions // ------------------------------------------------------------------------ /** * Get the current_date() function. *

* This translates into any dialect */ @Support public static Field currentDate() { return new CurrentDate(); } /** * Get the current_time() function. *

* This translates into any dialect */ @Support public static Field

* This translates into any dialect */ @Support public static Field currentTimestamp() { return new CurrentTimestamp(); } /** * Get the date difference in number of days. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field dateDiff(Date date1, Date date2) { return dateDiff(Utils.field(date1), Utils.field(date2)); } /** * Get the date difference in number of days. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field dateDiff(Field date1, Date date2) { return dateDiff(nullSafe(date1), Utils.field(date2)); } /** * Add an interval to a date. *

* This translates into any dialect * * @see Field#add(Number) */ @Support public static Field dateAdd(Date date, Number interval) { return dateAdd(Utils.field(date), Utils.field(interval)); } /** * Add an interval to a date. *

* This translates into any dialect * * @see Field#add(Field) */ @Support public static Field dateAdd(Field date, Field interval) { return nullSafe(date).add(interval); } /** * Add an interval to a date, given a date part. *

* This translates into any dialect */ @Support public static Field dateAdd(Date date, Number interval, DatePart datePart) { return new DateAdd(Utils.field(date), Utils.field(interval), datePart); } /** * Add an interval to a date, given a date part. *

* This translates into any dialect */ @Support public static Field dateAdd(Date date, Field interval, DatePart datePart) { return new DateAdd(Utils.field(date), nullSafe(interval), datePart); } /** * Add an interval to a date, given a date part. *

* This translates into any dialect */ @Support public static Field dateAdd(Field date, Number interval, DatePart datePart) { return new DateAdd(nullSafe(date), Utils.field(interval), datePart); } /** * Add an interval to a date, given a date part. *

* This translates into any dialect */ @Support public static Field dateAdd(Field date, Field interval, DatePart datePart) { return new DateAdd(nullSafe(date), nullSafe(interval), datePart); } /** * Get the date difference in number of days. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field dateDiff(Date date1, Field date2) { return dateDiff(Utils.field(date1), nullSafe(date2)); } /** * Get the date difference in number of days. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field dateDiff(Field date1, Field date2) { return new DateDiff(nullSafe(date1), nullSafe(date2)); } /** * Add an interval to a timestamp. *

* This translates into any dialect * * @see Field#add(Number) */ @Support public static Field timestampAdd(Timestamp timestamp, Number interval) { return timestampAdd(Utils.field(timestamp), Utils.field(interval)); } /** * Add an interval to a timestamp. *

* This translates into any dialect * * @see Field#add(Field) */ @Support public static Field timestampAdd(Field timestamp, Field interval) { return nullSafe(timestamp).add(interval); } /** * Add an interval to a timestamp, given a date part. *

* This translates into any dialect */ @Support public static Field timestampAdd(Timestamp date, Number interval, DatePart datePart) { return new DateAdd(Utils.field(date), Utils.field(interval), datePart); } /** * Add an interval to a timestamp, given a date part. *

* This translates into any dialect */ @Support public static Field timestampAdd(Timestamp date, Field interval, DatePart datePart) { return new DateAdd(Utils.field(date), nullSafe(interval), datePart); } /** * Add an interval to a timestamp, given a date part. *

* This translates into any dialect */ @Support public static Field timestampAdd(Field date, Number interval, DatePart datePart) { return new DateAdd(nullSafe(date), Utils.field(interval), datePart); } /** * Add an interval to a timestamp, given a date part. *

* This translates into any dialect */ @Support public static Field timestampAdd(Field date, Field interval, DatePart datePart) { return new DateAdd(nullSafe(date), nullSafe(interval), datePart); } /** * Get the timestamp difference as a INTERVAL DAY TO SECOND * type. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field timestampDiff(Timestamp timestamp1, Timestamp timestamp2) { return timestampDiff(Utils.field(timestamp1), Utils.field(timestamp2)); } /** * Get the timestamp difference as a INTERVAL DAY TO SECOND * type. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field timestampDiff(Field timestamp1, Timestamp timestamp2) { return timestampDiff(nullSafe(timestamp1), Utils.field(timestamp2)); } /** * Get the timestamp difference as a INTERVAL DAY TO SECOND * type. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field timestampDiff(Timestamp timestamp1, Field timestamp2) { return timestampDiff(Utils.field(timestamp1), nullSafe(timestamp2)); } /** * Get the timestamp difference as a INTERVAL DAY TO SECOND * type. *

* This translates into any dialect * * @see Field#sub(Field) */ @Support public static Field timestampDiff(Field timestamp1, Field timestamp2) { return new TimestampDiff(nullSafe(timestamp1), nullSafe(timestamp2)); } /** * Truncate a date to the beginning of the day. */ @Support({ CUBRID, HSQLDB, POSTGRES }) public static Field trunc(Date date) { return trunc(date, DatePart.DAY); } /** * Truncate a date to a given datepart. */ @Support({ CUBRID, HSQLDB, POSTGRES }) public static Field trunc(Date date, DatePart part) { return trunc(Utils.field(date), part); } /** * Truncate a timestamp to the beginning of the day. */ @Support({ CUBRID, HSQLDB, POSTGRES }) public static Field trunc(Timestamp timestamp) { return trunc(timestamp, DatePart.DAY); } /** * Truncate a timestamp to a given datepart. */ @Support({ CUBRID, HSQLDB, POSTGRES }) public static Field trunc(Timestamp timestamp, DatePart part) { return trunc(Utils.field(timestamp), part); } /** * Truncate a date or a timestamp to the beginning of the day. */ @Support({ CUBRID, HSQLDB, POSTGRES }) public static Field trunc(Field date) { return trunc(date, DatePart.DAY); } /** * Truncate a date or a timestamp to a given datepart. */ @Support({ CUBRID, HSQLDB, POSTGRES }) public static Field trunc(Field date, DatePart part) { return new TruncDate(date, part); } // ------------------------------------------------------------------------- /** * Get the extract(field, datePart) function. *

* This translates into any dialect */ @Support public static Field extract(java.util.Date value, DatePart datePart) { return extract(Utils.field(value), datePart); } /** * Get the extract(field, datePart) function. *

* This translates into any dialect */ @Support public static Field extract(Field field, DatePart datePart) { return new Extract(nullSafe(field), datePart); } /** * Get the year part of a date. *

* This is the same as calling {@link #extract(java.util.Date, DatePart)} * with {@link DatePart#YEAR} */ @Support public static Field year(java.util.Date value) { return extract(value, DatePart.YEAR); } /** * Get the year part of a date. *

* This is the same as calling {@link #extract(Field, DatePart)} * with {@link DatePart#YEAR} */ @Support public static Field year(Field field) { return extract(field, DatePart.YEAR); } /** * Get the month part of a date. *

* This is the same as calling {@link #extract(java.util.Date, DatePart)} * with {@link DatePart#MONTH} */ @Support public static Field month(java.util.Date value) { return extract(value, DatePart.MONTH); } /** * Get the month part of a date. *

* This is the same as calling {@link #extract(Field, DatePart)} * with {@link DatePart#MONTH} */ @Support public static Field month(Field field) { return extract(field, DatePart.MONTH); } /** * Get the day part of a date. *

* This is the same as calling {@link #extract(java.util.Date, DatePart)} * with {@link DatePart#DAY} */ @Support public static Field day(java.util.Date value) { return extract(value, DatePart.DAY); } /** * Get the day part of a date. *

* This is the same as calling {@link #extract(Field, DatePart)} * with {@link DatePart#DAY} */ @Support public static Field day(Field field) { return extract(field, DatePart.DAY); } /** * Get the hour part of a date. *

* This is the same as calling {@link #extract(java.util.Date, DatePart)} * with {@link DatePart#HOUR} */ @Support public static Field hour(java.util.Date value) { return extract(value, DatePart.HOUR); } /** * Get the hour part of a date. *

* This is the same as calling {@link #extract(Field, DatePart)} * with {@link DatePart#HOUR} */ @Support public static Field hour(Field field) { return extract(field, DatePart.HOUR); } /** * Get the minute part of a date. *

* This is the same as calling {@link #extract(java.util.Date, DatePart)} * with {@link DatePart#MINUTE} */ @Support public static Field minute(java.util.Date value) { return extract(value, DatePart.MINUTE); } /** * Get the minute part of a date. *

* This is the same as calling {@link #extract(Field, DatePart)} * with {@link DatePart#MINUTE} */ @Support public static Field minute(Field field) { return extract(field, DatePart.MINUTE); } /** * Get the second part of a date. *

* This is the same as calling {@link #extract(java.util.Date, DatePart)} * with {@link DatePart#SECOND} */ @Support public static Field second(java.util.Date value) { return extract(value, DatePart.SECOND); } /** * Get the second part of a date. *

* This is the same as calling {@link #extract(Field, DatePart)} * with {@link DatePart#SECOND} */ @Support public static Field second(Field field) { return extract(field, DatePart.SECOND); } /** * Convert a string value to a DATE. */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field date(String value) { return Utils.field(Convert.convert(value, Date.class), Date.class); } /** * Convert a temporal value to a DATE. */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field date(java.util.Date value) { return date(Utils.field(value)); } /** * Convert a temporal value to a DATE. */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field date(Field field) { return new DateOrTime(field, SQLDataType.DATE); } /** * Convert a string value to a TIME. */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field

* This has been observed to work with the following databases: *

    *
  • CUBRID (simulated using the GROUP BY .. WITH ROLLUP clause)
  • *
  • DB2
  • *
  • MySQL (simulated using the GROUP BY .. WITH ROLLUP clause)
  • *
  • Oracle
  • *
  • SQL Server
  • *
  • Sybase SQL Anywhere
  • *
*

* Please check the SQL Server documentation for a very nice explanation of * CUBE, ROLLUP, and GROUPING SETS * clauses in grouping contexts: http://msdn.microsoft.com/en-US/library/bb522495.aspx * * @param fields The fields that are part of the ROLLUP * function * @return A field to be used in a GROUP BY clause */ @Support({ CUBRID, MARIADB, MYSQL }) public static GroupField rollup(Field... fields) { return new Rollup(nullSafe(fields)); } /* [pro] xx xxx x xxxxxx x xxxxxxxxxxxx xxxxxxx xxx xxxxxxx xxxxxxxx xxxxxx x xxx x xxxx xxx xxxx xxxxxxxx xx xxxx xxxx xxx xxxxxxxxx xxxxxxxxxx x xxxx x xxxxxxxxxxxx x xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxxxx x xxxxxxxxxx xxx xxxxxxxxxxxxx x xxxxx x xxx x xxxxxx xxxxx xxx xxx xxxxxx xxxxxxxxxxxxx xxx x xxxx xxxx xxxxxxxxxxx xx x xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxx xx xxxxxxxx xxxxxxxxx xx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x xxxxxx xxxxxx xxx xxxxxx xxxx xxx xxxx xx xxx xxxxxxxxxxxxxxxxx x xxxxxxxx x xxxxxxx x xxxxx xx xx xxxx xx x xxxxxxxxxxx xxxxxxxxx xxxxxx xx xxxxxxxxxx xxxx xxxxxxx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxx x xxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx x xxx x xxxxxx x xxxxxxxx xxxxxxxxxxxx xxxxxxx xxx xxxxxxx xxxxxxxx xxxxx xxxxx x xxxx xxxxxxxx xxx xxxx xxxxxxxx xx x xxxxxx xxxxxx x xxx x xxxx xxx xxxx xxxxxxxx xx xxxx xxxx xxx xxxxxxxxx xxxxxxxxxx x xxxx x xxxxxxxxxxxx x xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxxxx x xxxxxxxxxx xxx xxxxxxxxxxxxx x xxxxx x xxx x xxxxxx xxxxx xxx xxx xxxxxx xxxxxxxxxxxxx xxx x xxxx xxxx xxxxxxxxxxx xx x xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxx xx xxxxxxxx xxxxxxxxx xx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x xxxxxx xxxxxx xxx xxxxxx xxxx xxx xxxx xx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxxx x xxxxxxx x xxxxx xx xx xxxx xx x xxxxxxxxxxx xxxxxxxxx xxxxxx xx xxxxxxxxxx xxxx xxxxxxx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x xxxxxxxxxxxxxxxx xxxxx x xxx xxxxxxxxxxxxxxxxxxxx xxx xxxx x x xx x x xxxxxxxxxxxxxx xxxx x xxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxx xxxxxxxxxxxxxxxxxxxx x xxx x xxxxxx x xxxxxxxx xxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxx xxxxxxxxx x xxxxxxxxx xxxxxxxx xxxxxx x xxx x xxxx xxx xxxx xxxxxxxx xx xxxx xxxx xxx xxxxxxxxx xxxxxxxxxx x xxxx x xxxxxxxxxxxx x xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxxxx x xxxxxxxxxx xxx xxxxxxxxxxxxx x xxxxx x xxx x xxxxxx xxxxx xxx xxx xxxxxx xxxxxxxxxxxxx xxx x xxxx xxxx xxxxxxxxxxx xx x xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxx xx xxxxxxxx xxxxxxxxx xx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x xxxxxx xxxxxxxxx xxx xxxxxx xxxx xxx xxxx xx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxxx x xxxxxxx x xxxxx xx xx xxxx xx x xxxxxxxxxxx xxxxxxxxx xxxxxx xx xxxxxxxxxx xxxx xxxxxxx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx x xxxxxxxxxxxxxxxx xxxxx x xxx xxxxxxxxxxxxxxxxxxxxxxx xxx xxxx x x xx x x xxxxxxxxxxxxxxxxx xxxx x xxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxx xxxxxxxxxxxxxxxxxxxx x xxx x xxxxxx x xxxxxxxx xxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxx xxx xxxxxxxxx x xxxxxxxxx xxxxxxxx xxxxxx x xxx x xxxx xxx xxxx xxxxxxxx xx xxxx xxxx xxx xxxxxxxxx xxxxxxxxxx x xxxx x xxxxxxxxxxxx x xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxxxx x xxxxxxxxxx xxx xxxxxxxxxxxxx x xxxxx x xxx x xxxxxx xxxxx xxx xxx xxxxxx xxxxxxxxxxxxx xxx x xxxx xxxx xxxxxxxxxxx xx x xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxx xx xxxxxxxx xxxxxxxxx xx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x x xxxxxx xxxxxxxxx xxx xxxxxx xxxx xxx xxxx xx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxxx x xxxxxxx x xxxxx xx xx xxxx xx x xxxxxxxxxxx xxxxxxxxx xxxxxx xx xxxxxxxxxx xxxx xxxxxxx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx xxxxxxxxxxxx xxxxxxxxxx x xxxxxxxxxxxxx xxxxx x xxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxx xxxx x x xx x x xxxxxxxxxxxxxxxxx xxxx x xxxxxxxx x xxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxxxxxxxxxxxx xxxxxxx x xxx x xxxxxx x xxxxxxxxxxxxxxx xxxxxxxxxxx xxxxx xx xx xxxx xxxxx xxxx x xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx xxxxxxxxxxxxxx xxxxxxxxxxx x xxxxxxxxxx x xxx x xxxx xxx xxxx xxxxxxxx xx xxxx xxxx xxx xxxxxxxxx xxxxxxxxxx x xxxx x xxxxxxxxxxxx x xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxxxx x xxxxxxxxxx xxx xxxxxxxxxxxxx x xxxxx x x xxxxxx xxxxx xxx xxxxxxxx xxxxxxxx x xxxxxxx xxx xxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxx x xxxx xxxxxxxxxxxxxxx x xxxx xxxxxxxxxxxxxxxxx xx xxxxxxxxxx xxxx xxxxxxx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxx x xxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx x xxx x xxxxxx x xxxxxxxxxxxxxxxxxxx xxxxxxx xxx xxxxxxx xxxxxxxxxxx xxxxx xx xx x xxxx xxxxx xxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxx x xxxxxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx x xxx x xxxx xxx xxxx xxxxxxxx xx xxxx xxxx xxx xxxxxxxxx xxxxxxxxxx x xxxx x xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxxxx x xxxxx x x xxxxxx xxxxxx xxx xxxxxxxx xxxxxxxxx x xxxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxx x xxxx xxxxxxxxxxxxxxx x xxxx xxxxxxxxxxxxxxxxx xx xxxxxxxxxx xxxxxxx xxxxxxxxxxx xxxxxx xxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx xxxxxxx x xxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxx x xx [/pro] */ // ------------------------------------------------------------------------ // XXX Bitwise operations // ------------------------------------------------------------------------ /** * The MySQL BIT_COUNT(field) function, counting the number of * bits that are set in this number. * * @see #bitCount(Field) */ @Support({ CUBRID, FIREBIRD, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitCount(Number value) { return bitCount(Utils.field(value)); } /** * The MySQL BIT_COUNT(field) function, counting the number of * bits that are set in this number. *

* This function is simulated in most other databases like this (for a * TINYINT field):

     * ([field] &   1) +
     * ([field] &   2) >> 1 +
     * ([field] &   4) >> 2 +
     * ([field] &   8) >> 3 +
     * ([field] &  16) >> 4 +
     *  ...
     * ([field] & 128) >> 7
     * 
*

* More efficient algorithms are very welcome */ @Support({ CUBRID, FIREBIRD, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitCount(Field field) { return new BitCount(nullSafe(field)); } /** * The bitwise not operator. * * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNot(T value) { return bitNot(Utils.field(value)); } /** * The bitwise not operator. *

* Most dialects natively support this using ~[field]. jOOQ * simulates this operator in some dialects using -[field] - 1 */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNot(Field field) { return new Neg(nullSafe(field), ExpressionOperator.BIT_NOT); } /** * The bitwise and operator. * * @see #bitAnd(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitAnd(T value1, T value2) { return bitAnd(Utils.field(value1), Utils.field(value2)); } /** * The bitwise and operator. * * @see #bitAnd(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitAnd(T value1, Field value2) { return bitAnd(Utils.field(value1), nullSafe(value2)); } /** * The bitwise and operator. * * @see #bitAnd(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitAnd(Field value1, T value2) { return bitAnd(nullSafe(value1), Utils.field(value2)); } /** * The bitwise and operator. *

* This is not supported by Derby, Ingres *

* This renders the and operation where available: *

[field1] & [field2]
* ... or the and function elsewhere: *
bitand([field1], [field2])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitAnd(Field field1, Field field2) { return new Expression(ExpressionOperator.BIT_AND, nullSafe(field1), nullSafe(field2)); } /** * The bitwise not and operator. * * @see #bitNand(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNand(T value1, T value2) { return bitNand(Utils.field(value1), Utils.field(value2)); } /** * The bitwise not and operator. * * @see #bitNand(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNand(T value1, Field value2) { return bitNand(Utils.field(value1), nullSafe(value2)); } /** * The bitwise not and operator. * * @see #bitNand(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNand(Field value1, T value2) { return bitNand(nullSafe(value1), Utils.field(value2)); } /** * The bitwise not and operator. *

* This is not supported by Derby, Ingres *

* This renders the not and operation where available: *

~([field1] & [field2])
* ... or the not and function elsewhere: *
bitnot(bitand([field1], [field2]))
* * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNand(Field field1, Field field2) { return new Expression(ExpressionOperator.BIT_NAND, nullSafe(field1), nullSafe(field2)); } /** * The bitwise or operator. * * @see #bitOr(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitOr(T value1, T value2) { return bitOr(Utils.field(value1), Utils.field(value2)); } /** * The bitwise or operator. * * @see #bitOr(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitOr(T value1, Field value2) { return bitOr(Utils.field(value1), nullSafe(value2)); } /** * The bitwise or operator. * * @see #bitOr(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitOr(Field value1, T value2) { return bitOr(nullSafe(value1), Utils.field(value2)); } /** * The bitwise or operator. *

* This is not supported by Derby, Ingres *

* This renders the or operation where available: *

[field1] | [field2]
* ... or the or function elsewhere: *
bitor([field1], [field2])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitOr(Field field1, Field field2) { return new Expression(ExpressionOperator.BIT_OR, nullSafe(field1), nullSafe(field2)); } /** * The bitwise not or operator. * * @see #bitNor(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNor(T value1, T value2) { return bitNor(Utils.field(value1), Utils.field(value2)); } /** * The bitwise not or operator. * * @see #bitNor(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNor(T value1, Field value2) { return bitNor(Utils.field(value1), nullSafe(value2)); } /** * The bitwise not or operator. * * @see #bitNor(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNor(Field value1, T value2) { return bitNor(nullSafe(value1), Utils.field(value2)); } /** * The bitwise not or operator. *

* This is not supported by Derby, Ingres *

* This renders the not or operation where available: *

~([field1] | [field2])
* ... or the not or function elsewhere: *
bitnot(bitor([field1], [field2]))
* * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitNor(Field field1, Field field2) { return new Expression(ExpressionOperator.BIT_NOR, nullSafe(field1), nullSafe(field2)); } /** * The bitwise xor operator. * * @see #bitXor(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXor(T value1, T value2) { return bitXor(Utils.field(value1), Utils.field(value2)); } /** * The bitwise xor operator. * * @see #bitXor(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXor(T value1, Field value2) { return bitXor(Utils.field(value1), nullSafe(value2)); } /** * The bitwise xor operator. * * @see #bitXor(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXor(Field value1, T value2) { return bitXor(nullSafe(value1), Utils.field(value2)); } /** * The bitwise xor operator. *

* This is not supported by Derby, Ingres *

* This renders the or operation where available: *

[field1] ^ [field2]
* ... or the xor function elsewhere: *
bitxor([field1], [field2])
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXor(Field field1, Field field2) { return new Expression(ExpressionOperator.BIT_XOR, nullSafe(field1), nullSafe(field2)); } /** * The bitwise not xor operator. * * @see #bitXNor(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXNor(T value1, T value2) { return bitXNor(Utils.field(value1), Utils.field(value2)); } /** * The bitwise not xor operator. * * @see #bitXNor(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXNor(T value1, Field value2) { return bitXNor(Utils.field(value1), nullSafe(value2)); } /** * The bitwise not xor operator. * * @see #bitXNor(Field, Field) * @see #bitNot(Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXNor(Field value1, T value2) { return bitXNor(nullSafe(value1), Utils.field(value2)); } /** * The bitwise not xor operator. *

* This is not supported by Derby, Ingres *

* This renders the or operation where available: *

~([field1] ^ [field2])
* ... or the not xor function elsewhere: *
bitnot(bitxor([field1], [field2]))
*/ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field bitXNor(Field field1, Field field2) { return new Expression(ExpressionOperator.BIT_XNOR, nullSafe(field1), nullSafe(field2)); } /** * The bitwise left shift operator. * * @see #shl(Field, Field) * @see #power(Field, Number) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shl(T value1, T value2) { return shl(Utils.field(value1), Utils.field(value2)); } /** * The bitwise left shift operator. * * @see #shl(Field, Field) * @see #power(Field, Number) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shl(T value1, Field value2) { return shl(Utils.field(value1), nullSafe(value2)); } /** * The bitwise left shift operator. * * @see #shl(Field, Field) * @see #power(Field, Number) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shl(Fieldvalue1, T value2) { return shl(nullSafe(value1), Utils.field(value2)); } /** * The bitwise left shift operator. *

* Some dialects natively support this using [field1] << [field2]. * jOOQ simulates this operator in some dialects using * [field1] * power(2, [field2]), where power might also be simulated. * * @see #power(Field, Field) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shl(Field field1, Field field2) { return new Expression(ExpressionOperator.SHL, nullSafe(field1), nullSafe(field2)); } /** * The bitwise right shift operator. * * @see #shr(Field, Field) * @see #power(Field, Number) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shr(T value1, T value2) { return shr(Utils.field(value1), Utils.field(value2)); } /** * The bitwise right shift operator. * * @see #shr(Field, Field) * @see #power(Field, Number) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shr(T value1, Field value2) { return shr(Utils.field(value1), nullSafe(value2)); } /** * The bitwise right shift operator. * * @see #shr(Field, Field) * @see #power(Field, Number) */ @Support({ CUBRID, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shr(Field value1, T value2) { return shr(nullSafe(value1), Utils.field(value2)); } /** * The bitwise right shift operator. *

* Some dialects natively support this using [field1] >> [field2]. * jOOQ simulates this operator in some dialects using * [field1] / power(2, [field2]), where power might also be simulated. * * @see #power(Field, Field) */ @Support({ CUBRID, H2, FIREBIRD, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field shr(Field field1, Field field2) { return new Expression(ExpressionOperator.SHR, nullSafe(field1), nullSafe(field2)); } // ------------------------------------------------------------------------ // XXX Mathematical functions // ------------------------------------------------------------------------ /** * Get the rand() function. */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static Field rand() { return new Rand(); } /** * Find the greatest among all values. *

* This function has no equivalent in Adaptive Server, Derby, SQL Server and * Sybase SQL Anywhere. Its current simulation implementation has * O(2^n) complexity and should be avoided for * n > 5! Better implementation suggestions are very * welcome. * * @see #greatest(Field, Field...) */ @Support public static Field greatest(T value, T... values) { return greatest(Utils.field(value), Utils.fields(values).toArray(new Field[0])); } /** * Find the greatest among all values. *

* This function has no equivalent in Adaptive Server, Derby, SQL Server and * Sybase SQL Anywhere. Its current simulation implementation has * O(2^n) complexity and should be avoided for * n > 5! Better implementation suggestions are very * welcome. */ @Support public static Field greatest(Field field, Field... others) { return new Greatest(nullSafeDataType(field), nullSafe(combine(field, others))); } /** * Find the least among all values. *

* This function has no equivalent in Adaptive Server, Derby, SQL Server and * Sybase SQL Anywhere. Its current simulation implementation has * O(2^n) complexity and should be avoided for * n > 5! Better implementation suggestions are very * welcome. * * @see #least(Field, Field...) */ @Support public static Field least(T value, T... values) { return least(Utils.field(value), Utils.fields(values).toArray(new Field[0])); } /** * Find the least among all values. *

* This function has no equivalent in Adaptive Server, Derby, SQL Server and * Sybase SQL Anywhere. Its current simulation implementation has * O(2^n) complexity and should be avoided for * n > 5! Better implementation suggestions are very * welcome. */ @Support public static Field least(Field field, Field... others) { return new Least(nullSafeDataType(field), nullSafe(combine(field, others))); } /** * Get the sign of a numeric field: sign(field). * * @see #sign(Field) */ @Support public static Field sign(Number value) { return sign(Utils.field(value)); } /** * Get the sign of a numeric field: sign(field). *

* This renders the sign function where available: *

sign([field])
* ... or simulates it elsewhere (without bind variables on values -1, 0, 1): *
     * CASE WHEN [this] > 0 THEN 1
     *      WHEN [this] < 0 THEN -1
     *      ELSE 0
     * END
     */
    @Support
    public static Field sign(Field field) {
        return new Sign(nullSafe(field));
    }

    /**
     * Get the absolute value of a numeric field: abs(field).
     *
     * @see #abs(Field)
     */
    @Support
    public static  Field abs(T value) {
        return abs(Utils.field(value));
    }

    /**
     * Get the absolute value of a numeric field: abs(field).
     * 

* This renders the same on all dialects: *

abs([field])
*/ @Support public static Field abs(Field field) { return function("abs", nullSafeDataType(field), nullSafe(field)); } /** * Get rounded value of a numeric field: round(field). * * @see #round(Field) */ @Support public static Field round(T value) { return round(Utils.field(value)); } /** * Get rounded value of a numeric field: round(field). *

* This renders the round function where available: *

round([field]) or
     * round([field], 0)
* ... or simulates it elsewhere using floor and ceil */ @Support public static Field round(Field field) { return new Round(nullSafe(field)); } /** * Get rounded value of a numeric field: round(field, decimals). * * @see #round(Field, int) */ @Support public static Field round(T value, int decimals) { return round(Utils.field(value), decimals); } /** * Get rounded value of a numeric field: round(field, decimals). *

* This renders the round function where available: *

round([field], [decimals])
* ... or simulates it elsewhere using floor and ceil */ @Support public static Field round(Field field, int decimals) { return new Round(nullSafe(field), decimals); } /** * Get the largest integer value not greater than [this]. * * @see #floor(Field) */ @Support public static Field floor(T value) { return floor(Utils.field(value)); } /** * Get the largest integer value not greater than [this]. *

* This renders the floor function where available: *

floor([this])
* ... or simulates it elsewhere using round: *
round([this] - 0.499999999999999)
*/ @Support public static Field floor(Field field) { return new Floor(nullSafe(field)); } /** * Get the smallest integer value not less than [this]. * * @see #ceil(Field) */ @Support public static Field ceil(T value) { return ceil(Utils.field(value)); } /** * Get the smallest integer value not less than [field]. *

* This renders the ceil or ceiling function where available: *

ceil([field]) or
     * ceiling([field])
* ... or simulates it elsewhere using round: *
round([field] + 0.499999999999999)
*/ @Support public static Field ceil(Field field) { return new Ceil(nullSafe(field)); } /** * Truncate a number to a given number of decimals. * * @see #trunc(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field trunc(T number) { return trunc(Utils.field(number), inline(0)); } /** * Truncate a number to a given number of decimals. * * @see #trunc(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field trunc(T number, int decimals) { return trunc(Utils.field(number), inline(decimals)); } /** * Truncate a number to a given number of decimals. * * @see #trunc(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field trunc(Field number, int decimals) { return trunc(nullSafe(number), inline(decimals)); } /** * Truncate a number to a given number of decimals. * * @see #trunc(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field trunc(T number, Field decimals) { return trunc(Utils.field(number), nullSafe(decimals)); } /** * Truncate a number to a given number of decimals. *

* This function truncates number to the amount of decimals * specified in decimals. Passing decimals = 0 to * this function is the same as using {@link #floor(Field)}. Passing * positive values for decimal has a similar effect as * {@link #round(Field, int)}. Passing negative values for * decimal will truncate number to a given power * of 10. Some examples *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Function callyields...
trunc(125.815)125
trunc(125.815, 0)125
trunc(125.815, 1)125.8
trunc(125.815, 2)125.81
trunc(125.815, -1)120
trunc(125.815, -2)100
* * @see #trunc(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field trunc(Field number, Field decimals) { return new Trunc(nullSafe(number), nullSafe(decimals)); } /** * Get the sqrt(field) function. * * @see #sqrt(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field sqrt(Number value) { return sqrt(Utils.field(value)); } /** * Get the sqrt(field) function. *

* This renders the sqrt function where available: *

sqrt([field])
... or simulates it elsewhere using * power (which in turn may also be simulated using ln and exp functions): *
power([field], 0.5)
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field sqrt(Field field) { return new Sqrt(nullSafe(field)); } /** * Get the exp(field) function, taking this field as the power of e. * * @see #exp(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field exp(Number value) { return exp(Utils.field(value)); } /** * Get the exp(field) function, taking this field as the power of e. *

* This renders the same on all dialects: *

exp([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field exp(Field field) { return function("exp", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the ln(field) function, taking the natural logarithm of this field. * * @see #ln(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field ln(Number value) { return ln(Utils.field(value)); } /** * Get the ln(field) function, taking the natural logarithm of this field. *

* This renders the ln or log function where available: *

ln([field]) or
     * log([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field ln(Field field) { return new Ln(nullSafe(field)); } /** * Get the log(field, base) function. * * @see #log(Field, int) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field log(Number value, int base) { return log(Utils.field(value), base); } /** * Get the log(field, base) function. *

* This renders the log function where available: *

log([field])
... or simulates it elsewhere (in * most RDBMS) using the natural logarithm: *
ln([field]) / ln([base])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field log(Field field, int base) { return new Ln(nullSafe(field), base); } /** * Get the power(field, exponent) function. * * @see #power(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field power(Number value, Number exponent) { return power(Utils.field(value), Utils.field(exponent)); } /** * Get the power(field, exponent) function. * * @see #power(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field power(Field field, Number exponent) { return power(nullSafe(field), Utils.field(exponent)); } /** * Get the power(field, exponent) function. * * @see #power(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field power(Number value, Field exponent) { return power(Utils.field(value), nullSafe(exponent)); } /** * Get the power(field, exponent) function. *

* This renders the power function where available: *

power([field], [exponent])
... or simulates it * elsewhere using ln and exp: *
exp(ln([field]) * [exponent])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field power(Field field, Field exponent) { return new Power(nullSafe(field), nullSafe(exponent)); } /** * Get the arc cosine(field) function. * * @see #acos(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field acos(Number value) { return acos(Utils.field(value)); } /** * Get the arc cosine(field) function. *

* This renders the acos function where available: *

acos([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field acos(Field field) { return new Acos(nullSafe(field)); } /** * Get the arc sine(field) function. * * @see #asin(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field asin(Number value) { return asin(Utils.field(value)); } /** * Get the arc sine(field) function. *

* This renders the asin function where available: *

asin([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field asin(Field field) { return new Asin(nullSafe(field)); } /** * Get the arc tangent(field) function. * * @see #atan(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field atan(Number value) { return atan(Utils.field(value)); } /** * Get the arc tangent(field) function. *

* This renders the atan function where available: *

atan([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field atan(Field field) { return new Atan(nullSafe(field)); } /** * Get the atan2(field, y) function. * * @see #atan2(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field atan2(Number x, Number y) { return atan2(Utils.field(x), Utils.field(y)); } /** * Get the atan2(field, y) function. * * @see #atan2(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field atan2(Number x, Field y) { return atan2(Utils.field(x), nullSafe(y)); } /** * Get the atan2(field, y) function. * * @see #atan2(Field, Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field atan2(Field x, Number y) { return atan2(nullSafe(x), Utils.field(y)); } /** * Get the atan2(field, y) function. *

* This renders the atan2 or atn2 function where available: *

atan2([x], [y]) or
     * atn2([x], [y])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field atan2(Field x, Field y) { return new Function(Term.ATAN2, SQLDataType.NUMERIC, nullSafe(x), nullSafe(y)); } /** * Get the cosine(field) function. * * @see #cos(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field cos(Number value) { return cos(Utils.field(value)); } /** * Get the cosine(field) function. *

* This renders the cos function where available: *

cos([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field cos(Field field) { return function("cos", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the sine(field) function. * * @see #sin(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field sin(Number value) { return sin(Utils.field(value)); } /** * Get the sine(field) function. *

* This renders the sin function where available: *

sin([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field sin(Field field) { return function("sin", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the tangent(field) function. * * @see #tan(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field tan(Number value) { return tan(Utils.field(value)); } /** * Get the tangent(field) function. *

* This renders the tan function where available: *

tan([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field tan(Field field) { return function("tan", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the cotangent(field) function. * * @see #cot(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field cot(Number value) { return cot(Utils.field(value)); } /** * Get the cotangent(field) function. *

* This renders the cot function where available: *

cot([field])
... or simulates it elsewhere using * sin and cos:
cos([field]) / sin([field])
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field cot(Field field) { return new Cot(nullSafe(field)); } /** * Get the hyperbolic sine function: sinh(field). * * @see #sinh(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field sinh(Number value) { return sinh(Utils.field(value)); } /** * Get the hyperbolic sine function: sinh(field). *

* This renders the sinh function where available: *

sinh([field])
... or simulates it elsewhere using * exp:
(exp([field] * 2) - 1) / (exp([field] * 2))
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field sinh(Field field) { return new Sinh(nullSafe(field)); } /** * Get the hyperbolic cosine function: cosh(field). * * @see #cosh(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field cosh(Number value) { return cosh(Utils.field(value)); } /** * Get the hyperbolic cosine function: cosh(field). *

* This renders the cosh function where available: *

cosh([field])
... or simulates it elsewhere using * exp:
(exp([field] * 2) + 1) / (exp([field] * 2))
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field cosh(Field field) { return new Cosh(nullSafe(field)); } /** * Get the hyperbolic tangent function: tanh(field). * * @see #tanh(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field tanh(Number value) { return tanh(Utils.field(value)); } /** * Get the hyperbolic tangent function: tanh(field). *

* This renders the tanh function where available: *

tanh([field])
... or simulates it elsewhere using * exp: *
(exp([field] * 2) - 1) / (exp([field] * 2) + 1)
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field tanh(Field field) { return new Tanh(nullSafe(field)); } /** * Get the hyperbolic cotangent function: coth(field). * * @see #coth(Field) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field coth(Number value) { return coth(Utils.field(value)); } /** * Get the hyperbolic cotangent function: coth(field). *

* This is not supported by any RDBMS, but simulated using exp exp: *

(exp([field] * 2) + 1) / (exp([field] * 2) - 1)
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field coth(Field field) { field = nullSafe(field); return exp(field.mul(2)).add(1).div(exp(field.mul(2)).sub(1)); } /** * Calculate degrees from radians from this field. * * @see #deg(Field) */ @Support public static Field deg(Number value) { return deg(Utils.field(value)); } /** * Calculate degrees from radians from this field. *

* This renders the degrees function where available: *

degrees([field])
... or simulates it elsewhere: *
[field] * 180 / PI
*/ @Support public static Field deg(Field field) { return new Degrees(nullSafe(field)); } /** * Calculate radians from degrees from this field. * * @see #rad(Field) */ @Support public static Field rad(Number value) { return rad(Utils.field(value)); } /** * Calculate radians from degrees from this field. *

* This renders the degrees function where available: *

degrees([field])
... or simulates it elsewhere: *
[field] * PI / 180
*/ @Support public static Field rad(Field field) { return new Radians(nullSafe(field)); } // ------------------------------------------------------------------------- // Pseudo-fields and functions for use in the context of a CONNECT BY clause // ------------------------------------------------------------------------- /** * Retrieve the Oracle-specific LEVEL pseudo-field (to be used * along with CONNECT BY clauses). */ @Support({ CUBRID }) public static Field level() { return field("level", Integer.class); } /** * Retrieve the Oracle-specific CONNECT_BY_ISCYCLE pseudo-field * (to be used along with CONNECT BY clauses). */ @Support({ CUBRID }) public static Field connectByIsCycle() { return field("connect_by_iscycle", Boolean.class); } /** * Retrieve the Oracle-specific CONNECT_BY_ISLEAF pseudo-field * (to be used along with CONNECT BY clauses). */ @Support({ CUBRID }) public static Field connectByIsLeaf() { return field("connect_by_isleaf", Boolean.class); } /** * Retrieve the Oracle-specific CONNECT_BY_ROOT pseudo-column * (to be used along with CONNECT BY clauses). */ @Support({ CUBRID }) public static Field connectByRoot(Field field) { return field("{connect_by_root} {0}", nullSafe(field).getDataType(), field); } /** * Retrieve the Oracle-specific * SYS_CONNECT_BY_PATH(field, separator) function (to be used * along with CONNECT BY clauses). */ @Support({ CUBRID }) public static Field sysConnectByPath(Field field, String separator) { return field("{sys_connect_by_path}({0}, {1})", String.class, field, inline(separator)); } /** * Add the Oracle-specific PRIOR unary operator before a field * (to be used along with CONNECT BY clauses). */ @Support({ CUBRID }) public static Field prior(Field field) { return new Prior(field); } // ------------------------------------------------------------------------- // Other pseudo-fields and functions // ------------------------------------------------------------------------- /** * Retrieve the Oracle-specific ROWNUM pseudo-field. */ @Support({ CUBRID }) public static Field rownum() { return field("rownum", Integer.class); } // ------------------------------------------------------------------------- // XXX Aggregate functions // ------------------------------------------------------------------------- /** * Get the count(*) function. */ @Support public static AggregateFunction count() { return count(field("*", Integer.class)); } /** * Get the count(field) function. */ @Support public static AggregateFunction count(Field field) { return new Function("count", SQLDataType.INTEGER, nullSafe(field)); } /** * Get the count(table) function. */ @Support(POSTGRES) public static AggregateFunction count(Table table) { return new Function("count", SQLDataType.INTEGER, tableByName(table.getName())); } /** * Get the count(distinct field) function. */ @Support({ CUBRID, DERBY, H2, HSQLDB, FIREBIRD, MARIADB, MYSQL, POSTGRES, SQLITE }) public static AggregateFunction countDistinct(Field field) { return new Function("count", true, SQLDataType.INTEGER, nullSafe(field)); } /** * Get the count(distinct table) function. */ @Support(POSTGRES) public static AggregateFunction countDistinct(Table table) { return new Function("count", true, SQLDataType.INTEGER, tableByName(table.getName())); } /** * Get the count(distinct field1, field2) function. *

* Some dialects support several expressions in the * COUNT(DISTINCT expr1, expr2) aggregate function. *

* {@link SQLDialect#POSTGRES} supports this as * COUNT(DISTINCT(expr1, expr2)). */ @Support({ HSQLDB, MYSQL, POSTGRES }) public static AggregateFunction countDistinct(Field... fields) { return new Function("count", true, SQLDataType.INTEGER, nullSafe(fields)); } /** * Get the max value over a field: max(field). */ @Support public static AggregateFunction max(Field field) { return new Function("max", nullSafeDataType(field), nullSafe(field)); } /** * Get the max value over a field: max(distinct field). */ @Support public static AggregateFunction maxDistinct(Field field) { return new Function("max", true, nullSafeDataType(field), nullSafe(field)); } /** * Get the min value over a field: min(field). */ @Support public static AggregateFunction min(Field field) { return new Function("min", nullSafeDataType(field), nullSafe(field)); } /** * Get the min value over a field: min(distinct field). */ @Support public static AggregateFunction minDistinct(Field field) { return new Function("min", true, nullSafeDataType(field), nullSafe(field)); } /** * Get the sum over a numeric field: sum(field). */ @Support public static AggregateFunction sum(Field field) { return new Function("sum", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the sum over a numeric field: sum(distinct field). */ @Support public static AggregateFunction sumDistinct(Field field) { return new Function("sum", true, SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the average over a numeric field: avg(field). */ @Support public static AggregateFunction avg(Field field) { return new Function("avg", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the average over a numeric field: avg(distinct field). */ @Support public static AggregateFunction avgDistinct(Field field) { return new Function("avg", true, SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the median over a numeric field: median(field). */ @Support({ CUBRID, HSQLDB }) public static AggregateFunction median(Field field) { return new Function("median", SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the population standard deviation of a numeric field: stddev_pop(field). */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static AggregateFunction stddevPop(Field field) { return new Function(Term.STDDEV_POP, SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the sample standard deviation of a numeric field: stddev_samp(field). */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static AggregateFunction stddevSamp(Field field) { return new Function(Term.STDDEV_SAMP, SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the population variance of a numeric field: var_pop(field). */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static AggregateFunction varPop(Field field) { return new Function(Term.VAR_POP, SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the sample variance of a numeric field: var_samp(field). */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static AggregateFunction varSamp(Field field) { return new Function(Term.VAR_SAMP, SQLDataType.NUMERIC, nullSafe(field)); } /** * Get the REGR_SLOPE linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrSlope(Field y, Field x) { return new Function("regr_slope", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_INTERCEPT linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrIntercept(Field y, Field x) { return new Function("regr_intercept", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_COUNT linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrCount(Field y, Field x) { return new Function("regr_count", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_R2 linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrR2(Field y, Field x) { return new Function("regr_r2", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_AVGX linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrAvgX(Field y, Field x) { return new Function("regr_avgx", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_AVGY linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrAvgY(Field y, Field x) { return new Function("regr_avgy", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_SXX linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrSXX(Field y, Field x) { return new Function("regr_sxx", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_SYY linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrSYY(Field y, Field x) { return new Function("regr_syy", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the REGR_SXY linear regression function. *

* The linear regression functions fit an ordinary-least-squares regression * line to a set of number pairs. You can use them as both aggregate and * window functions, where this is supported. *

* Note that {@link SQLDialect#DB2} does not support linear regression * window functions. */ @Support({ POSTGRES }) public static AggregateFunction regrSXY(Field y, Field x) { return new Function("regr_sxy", SQLDataType.NUMERIC, nullSafe(y), nullSafe(x)); } /** * Get the aggregated concatenation for a field. *

* This is natively supported by {@link SQLDialect#ORACLE11G} upwards. It is * simulated by the following dialects: *

    *
  • {@link SQLDialect#CUBRID}: Using GROUP_CONCAT()
  • *
  • {@link SQLDialect#DB2}: Using XMLAGG()
  • *
  • {@link SQLDialect#H2}: Using GROUP_CONCAT()
  • *
  • {@link SQLDialect#HSQLDB}: Using GROUP_CONCAT()
  • *
  • {@link SQLDialect#MYSQL}: Using GROUP_CONCAT()
  • *
  • {@link SQLDialect#POSTGRES}: Using STRING_AGG()
  • *
  • {@link SQLDialect#SYBASE}: Using LIST()
  • *
* * @see #groupConcat(Field) */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static OrderedAggregateFunction listAgg(Field field) { return new Function(Term.LIST_AGG, SQLDataType.VARCHAR, nullSafe(field)); } /** * Get the aggregated concatenation for a field. *

* This is natively supported by {@link SQLDialect#ORACLE11G} upwards. It is * simulated by the following dialects: *

    *
  • {@link SQLDialect#CUBRID}: Using GROUP_CONCAT
  • *
  • {@link SQLDialect#DB2}: Using XMLAGG()
  • *
  • {@link SQLDialect#H2}: Using GROUP_CONCAT
  • *
  • {@link SQLDialect#HSQLDB}: Using GROUP_CONCAT
  • *
  • {@link SQLDialect#MYSQL}: Using GROUP_CONCAT
  • *
  • {@link SQLDialect#POSTGRES}: Using STRING_AGG()
  • *
  • {@link SQLDialect#SYBASE}: Using LIST()
  • *
* * @see #groupConcat(Field) */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static OrderedAggregateFunction listAgg(Field field, String separator) { return new Function(Term.LIST_AGG, SQLDataType.VARCHAR, nullSafe(field), inline(separator)); } /** * Get the aggregated concatenation for a field. *

* This is natively supported by *

    *
  • {@link SQLDialect#CUBRID}
  • *
  • {@link SQLDialect#H2}
  • *
  • {@link SQLDialect#HSQLDB}
  • *
  • {@link SQLDialect#MYSQL}
  • *
  • {@link SQLDialect#SQLITE} (but without ORDER BY)
  • *
*

* It is simulated by the following dialects: *

    *
  • {@link SQLDialect#DB2}: Using XMLAGG()
  • *
  • {@link SQLDialect#ORACLE}: Using LISTAGG()
  • *
  • {@link SQLDialect#POSTGRES}: Using STRING_AGG()
  • *
  • {@link SQLDialect#SYBASE}: Using LIST()
  • *
* * @see #listAgg(Field) */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static GroupConcatOrderByStep groupConcat(Field field) { return new GroupConcat(nullSafe(field)); } /** * Get the aggregated concatenation for a field. *

* This is natively supported by *

    *
  • {@link SQLDialect#CUBRID}
  • *
  • {@link SQLDialect#H2}
  • *
  • {@link SQLDialect#HSQLDB}
  • *
  • {@link SQLDialect#MYSQL}
  • *
  • {@link SQLDialect#SQLITE}
  • *
*

* It is simulated by the following dialects: *

    *
  • {@link SQLDialect#DB2}: Using XMLAGG()
  • *
  • {@link SQLDialect#ORACLE}: Using LISTAGG()
  • *
  • {@link SQLDialect#POSTGRES}: Using STRING_AGG()
  • *
  • {@link SQLDialect#SYBASE}: Using LIST()
  • *
* * @see #listAgg(Field) */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) public static AggregateFunction groupConcat(Field field, String separator) { return new GroupConcat(nullSafe(field)).separator(separator); } /** * Get the aggregated concatenation for a field. *

* This is natively supported by *

    *
  • {@link SQLDialect#CUBRID}
  • *
  • {@link SQLDialect#H2}
  • *
  • {@link SQLDialect#HSQLDB}
  • *
  • {@link SQLDialect#MYSQL}
  • *
*

* It is simulated by the following dialects: *

    *
  • {@link SQLDialect#SYBASE}: Using LIST()
  • *
  • {@link SQLDialect#POSTGRES}: Using STRING_AGG()
  • *
* * @see #listAgg(Field) */ @Support({ CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static GroupConcatOrderByStep groupConcatDistinct(Field field) { return new GroupConcat(nullSafe(field), true); } // ------------------------------------------------------------------------- // XXX Window clauses // ------------------------------------------------------------------------- /** * Create a {@link WindowSpecification} with a PARTITION BY clause. */ @Support({ CUBRID, POSTGRES }) public static WindowSpecificationOrderByStep partitionBy(Field... fields) { return new WindowSpecificationImpl().partitionBy(fields); } /** * Create a {@link WindowSpecification} with a PARTITION BY clause. */ @Support({ CUBRID, POSTGRES }) public static WindowSpecificationOrderByStep partitionBy(Collection> fields) { return new WindowSpecificationImpl().partitionBy(fields); } /** * Create a {@link WindowSpecification} with an ORDER BY clause. */ @Support({ CUBRID, POSTGRES }) public static WindowSpecificationOrderByStep orderBy(Field... fields) { return new WindowSpecificationImpl().orderBy(fields); } /** * Create a {@link WindowSpecification} with an ORDER BY clause. */ @Support({ CUBRID, POSTGRES }) public static WindowSpecificationRowsStep orderBy(SortField... fields) { return new WindowSpecificationImpl().orderBy(fields); } /** * Create a {@link WindowSpecification} with an ORDER BY clause. */ @Support({ CUBRID, POSTGRES }) public static WindowSpecificationRowsStep orderBy(Collection> fields) { return new WindowSpecificationImpl().orderBy(fields); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationFinalStep rowsUnboundedPreceding() { return new WindowSpecificationImpl().rowsUnboundedPreceding(); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationFinalStep rowsPreceding(int number) { return new WindowSpecificationImpl().rowsPreceding(number); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationFinalStep rowsCurrentRow() { return new WindowSpecificationImpl().rowsCurrentRow(); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationFinalStep rowsUnboundedFollowing() { return new WindowSpecificationImpl().rowsUnboundedFollowing(); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationFinalStep rowsFollowing(int number) { return new WindowSpecificationImpl().rowsFollowing(number); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationRowsAndStep rowsBetweenUnboundedPreceding() { return new WindowSpecificationImpl().rowsBetweenUnboundedPreceding(); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationRowsAndStep rowsBetweenPreceding(int number) { return new WindowSpecificationImpl().rowsBetweenPreceding(number); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationRowsAndStep rowsBetweenCurrentRow() { return new WindowSpecificationImpl().rowsBetweenCurrentRow(); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationRowsAndStep rowsBetweenUnboundedFollowing() { return new WindowSpecificationImpl().rowsBetweenUnboundedFollowing(); } /** * Create a {@link WindowSpecification} with a ROWS clause. */ @Support({ POSTGRES }) public static WindowSpecificationRowsAndStep rowsBetweenFollowing(int number) { return new WindowSpecificationImpl().rowsBetweenFollowing(number); } // ------------------------------------------------------------------------- // XXX Window functions // ------------------------------------------------------------------------- /** * The row_number() over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. *

* Newer versions of {@link SQLDialect#DERBY} and {@link SQLDialect#H2} also * support the ROW_NUMBER() OVER() window function without any * window clause. See the respective docs for details. * {@link SQLDialect#HSQLDB} can simulate this function using * ROWNUM() */ @Support({ CUBRID, DERBY, H2, HSQLDB, POSTGRES }) public static WindowOverStep rowNumber() { return new Function(ROW_NUMBER, SQLDataType.INTEGER); } /** * The rank() over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowOverStep rank() { return new Function("rank", SQLDataType.INTEGER); } /* [pro] xx xxx x xxx xxxxxxxxxxxxxxxx xxxxxx xxxxx xxxxxx xx xxxxxx xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxx xxxxxxxxx xx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxx x xx [/pro] */ /** * The dense_rank() over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowOverStep denseRank() { return new Function("dense_rank", SQLDataType.INTEGER); } /* [pro] xx xxx x xxx xxxxxxxxxxxxxxxxxxxxxx xxxxxx xxxxx xxxxxx xx xxxxxx xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxx xxxxxxxxx xx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx xxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxx x xx [/pro] */ /** * The precent_rank() over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowOverStep percentRank() { return new Function("percent_rank", SQLDataType.NUMERIC); } /* [pro] xx xxx x xxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxx xxxxx xxxxxx xx xxxxxx xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxx xxxxxxxxx xx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxx x xx [/pro] */ /** * The cume_dist() over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowOverStep cumeDist() { return new Function("cume_dist", SQLDataType.NUMERIC); } /* [pro] xx xxx x xxx xxxxxxxxxxxxxxxxxxxxx xxxxxx xxxxx xxxxxx xx xxxxxx xxxxxxxxxxxxxxx x xxxxxxx xxxxxxxxx xxxxxxxxx xx xxxxxxxxxx xxxxxx xx xxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxx x xx [/pro] */ /** * The ntile([number]) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowOverStep ntile(int number) { return new Function("ntile", SQLDataType.INTEGER, inline(number)); } /** * The first_value(field) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep firstValue(Field field) { return new Function("first_value", nullSafeDataType(field), nullSafe(field)); } /** * The last_value(field) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lastValue(Field field) { return new Function("last_value", nullSafeDataType(field), nullSafe(field)); } /** * The lead(field) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lead(Field field) { return new Function("lead", nullSafeDataType(field), nullSafe(field)); } /** * The lead(field, offset) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lead(Field field, int offset) { return new Function("lead", nullSafeDataType(field), nullSafe(field), inline(offset)); } /** * The * lead(field, offset, defaultValue) over ([analytic clause]) * function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lead(Field field, int offset, T defaultValue) { return lead(nullSafe(field), offset, Utils.field(defaultValue)); } /** * The * lead(field, offset, defaultValue) over ([analytic clause]) * function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lead(Field field, int offset, Field defaultValue) { return new Function("lead", nullSafeDataType(field), nullSafe(field), inline(offset), nullSafe(defaultValue)); } /** * The lag(field) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lag(Field field) { return new Function("lag", nullSafeDataType(field), nullSafe(field)); } /** * The lag(field, offset) over ([analytic clause]) function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lag(Field field, int offset) { return new Function("lag", nullSafeDataType(field), nullSafe(field), inline(offset)); } /** * The * lag(field, offset, defaultValue) over ([analytic clause]) * function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lag(Field field, int offset, T defaultValue) { return lag(nullSafe(field), offset, Utils.field(defaultValue)); } /** * The * lag(field, offset, defaultValue) over ([analytic clause]) * function. *

* Window functions are supported in CUBRID, DB2, Postgres, Oracle, SQL * Server and Sybase. */ @Support({ CUBRID, POSTGRES }) public static WindowIgnoreNullsStep lag(Field field, int offset, Field defaultValue) { return new Function("lag", nullSafeDataType(field), nullSafe(field), inline(offset), nullSafe(defaultValue)); } // ------------------------------------------------------------------------- // XXX Bind values // ------------------------------------------------------------------------- /** * Create a named parameter with a generic type ({@link Object} / * {@link SQLDataType#OTHER}) and no initial value. *

* Try to avoid this method when using any of these databases, as these * databases may have trouble inferring the type of the bind value. Use * typed named parameters instead, using {@link #param(String, Class)} or * {@link #param(String, DataType)} *

    *
  • {@link SQLDialect#DB2}
  • *
  • {@link SQLDialect#DERBY}
  • *
  • {@link SQLDialect#H2}
  • *
  • {@link SQLDialect#HSQLDB}
  • *
  • {@link SQLDialect#INGRES}
  • *
  • {@link SQLDialect#SYBASE}
  • *
* * @see #param(String, Object) */ @Support public static Param param(String name) { return param(name, Object.class); } /** * Create a named parameter with a defined type and no initial value. * * @see #param(String, Object) */ @Support public static Param param(String name, Class type) { return param(name, DefaultDataType.getDataType(null, type)); } /** * Create a named parameter with a defined type and no initial value. * * @see #param(String, Object) */ @Support public static Param param(String name, DataType type) { return new Val(null, type, name); } /** * Create a named parameter with an initial value. *

* Named parameters are useful for several use-cases: *

    *
  • They can be used with Spring's JdbcTemplate, which * supports named parameters. Use * {@link DSLContext#renderNamedParams(QueryPart)} to render * parameter names in SQL
  • *
  • Named parameters can be retrieved using a well-known name from * {@link Query#getParam(String)} and {@link Query#getParams()}.
  • *
* * @see Query#getParam(String) * @see Query#getParams() * @see DSLContext#renderNamedParams(QueryPart) */ @Support public static Param param(String name, T value) { return new Val(value, Utils.field(value).getDataType(), name); } /** * A synonym for {@link #val(Object)} to be used in Scala and Groovy, where * val is a reserved keyword. * * @see #val(Object) */ @Support public static Param value(T value) { return val(value); } /** * A synonym for {@link #val(Object, Class)} to be used in Scala and Groovy, where * val is a reserved keyword. * * @see #val(Object, Class) */ @Support public static Param value(Object value, Class type) { return val(value, type); } /** * A synonym for {@link #val(Object, Field)} to be used in Scala and Groovy, where * val is a reserved keyword. * * @see #val(Object, Field) */ @Support public static Param value(Object value, Field field) { return val(value, field); } /** * A synonym for {@link #val(Object, DataType)} to be used in Scala and Groovy, where * val is a reserved keyword. * * @see #val(Object, DataType) */ @Support public static Param value(Object value, DataType type) { return val(value, type); } /** * Create a bind value, that is always inlined. *

* The resulting bind value is always inlined, regardless of the * {@link Settings#getStatementType()} property of the rendering factory. * Unlike with {@link #field(String)}, you can expect value to * be properly escaped for SQL syntax correctness and SQL injection * prevention. For example: *

    *
  • inline("abc'def") renders 'abc''def'
  • *
  • field("abc'def") renders abc'def
  • *
* * @see #val(Object) */ @Support public static Param inline(T value) { Param val = val(value); val.setInline(true); return val; } /** * Create a bind value, that is always inlined. *

* This is a convenience method for {@link #inline(Object)}, returning * Field<String>, rather than * Field<Character> * * @see #inline(Object) */ @Support public static Param inline(char character) { return inline("" + character); } /** * Create a bind value, that is always inlined. *

* This is a convenience method for {@link #inline(Object)}, returning * Field<String>, rather than * Field<Character> * * @see #inline(Object) */ @Support public static Param inline(Character character) { return inline((character == null) ? null : ("" + character)); } /** * Create a bind value, that is always inlined. *

* This is a convenience method for {@link #inline(Object)}, returning * Field<String>, rather than * Field<CharSequence> * * @see #inline(Object) */ @Support public static Param inline(CharSequence character) { // Delegate to inline(T) return (Param) inline((Object) ((character == null) ? null : ("" + character))); } /** * Create a bind value, that is always inlined. *

* The resulting bind value is always inlined, regardless of the * {@link Settings#getStatementType()} property of the rendering factory. * Unlike with {@link #field(String, Class)}, you can expect * value to be properly escaped for SQL syntax correctness and * SQL injection prevention. For example: *

    *
  • inline("abc'def") renders 'abc''def'
  • *
  • field("abc'def") renders abc'def
  • *
* * @see #val(Object, Class) */ @Support public static Param inline(Object value, Class type) { Param val = val(value, type); val.setInline(true); return val; } /** * Create a bind value, that is always inlined. *

* The resulting bind value is always inlined, regardless of the * {@link Settings#getStatementType()} property of the rendering factory. * Unlike with {@link #field(String, DataType)}, you can expect * value to be properly escaped for SQL syntax correctness and * SQL injection prevention. For example: *

    *
  • inline("abc'def") renders 'abc''def'
  • *
  • field("abc'def") renders abc'def
  • *
* * @see #val(Object, Field) */ @Support public static Param inline(Object value, Field field) { Param val = val(value, field); val.setInline(true); return val; } /** * Create a bind value, that is always inlined. *

* The resulting bind value is always inlined, regardless of the * {@link Settings#getStatementType()} property of the rendering factory. * Unlike with {@link #field(String, DataType)}, you can expect * value to be properly escaped for SQL syntax correctness and * SQL injection prevention. For example: *

    *
  • inline("abc'def") renders 'abc''def'
  • *
  • field("abc'def") renders abc'def
  • *
* * @see #val(Object, DataType) */ @Support public static Param inline(Object value, DataType type) { Param val = val(value, type); val.setInline(true); return val; } /** * Get a bind value. *

* jOOQ tries to derive the RDBMS {@link DataType} from the provided Java * type <T>. This may not always be accurate, which can * lead to problems in some strongly typed RDMBS, especially when value is * null. These databases are namely: *

    *
  • {@link SQLDialect#DERBY}
  • *
  • {@link SQLDialect#DB2}
  • *
  • {@link SQLDialect#H2}
  • *
  • {@link SQLDialect#HSQLDB}
  • *
  • {@link SQLDialect#INGRES}
  • *
  • {@link SQLDialect#SYBASE}
  • *
*

* If you need more type-safety, please use {@link #val(Object, DataType)} * instead, and provide the precise RDMBS-specific data type, that is * needed. * * @param The generic value type * @param value The constant value * @return A field representing the constant value */ @Support public static Param val(T value) { Class type = (value == null) ? Object.class : value.getClass(); return (Param) val(value, getDataType(type)); } /** * Get a bind value with an associated type, taken from a field. * * @param The generic value type * @param value The constant value * @param type The data type to enforce upon the value * @return A field representing the constant value * @see #val(Object, DataType) */ @Support public static Param val(Object value, Class type) { return val(value, getDataType(type)); } /** * Get a bind value with an associated type, taken from a field. * * @param The generic value type * @param value The constant value * @param field The field whose data type to enforce upon the value * @return A field representing the constant value * @see #val(Object, DataType) */ @Support public static Param val(Object value, Field field) { return val(value, nullSafeDataType(field)); } /** * Get a bind value with an associated type. *

* This will try to bind value as type in a * PreparedStatement. If value and * type are not compatible, jOOQ will first try to convert and * then to cast value to type. * * @param The generic value type * @param value The constant value * @param type The data type to enforce upon the value * @return A field representing the constant value */ @Support public static Param val(Object value, DataType type) { // Advanced data types have dedicated constant types if (value instanceof UDTRecord) { return new UDTConstant((UDTRecord) value); } /* [pro] xx xxxx xx xxxxxx xxxxxxxxxx xxxxxxxxxxxx x xxxxxx xxx xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx x xx [/pro] */ // The default behaviour else { T converted = type.convert(value); return new Val(converted, mostSpecific(converted, type)); } } /** * Get the "most specific" data type between a concrete value and an actual * coercion data type. *

* [#2007] When coercing a (previously converted) value to a type, it may be that * the type is still more general than the actual type. This is typically * the case when dataType == SQLDataType.OTHER, i.e. when * dataType.getType() == Object.class. In that case, it is wise * to keep the additional type information of the value * * @param value The value * @param dataType The coercion data type * @return The most specific data type */ private static DataType mostSpecific(T value, DataType dataType) { if (value != null) { Class valueType = (Class) value.getClass(); Class coercionType = dataType.getType(); if (valueType != coercionType && coercionType.isAssignableFrom(valueType)) { return DefaultDataType.getDataType(null, valueType, dataType); } } return dataType; } // [jooq-tools] START [row-value] /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row1 row(T1 t1) { return row(Utils.field(t1)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row2 row(T1 t1, T2 t2) { return row(Utils.field(t1), Utils.field(t2)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row3 row(T1 t1, T2 t2, T3 t3) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row4 row(T1 t1, T2 t2, T3 t3, T4 t4) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row5 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row6 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row7 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row8 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row9 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row10 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row11 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row12 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row13 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row14 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row15 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row16 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row17 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16), Utils.field(t17)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row18 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16), Utils.field(t17), Utils.field(t18)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row19 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16), Utils.field(t17), Utils.field(t18), Utils.field(t19)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row20 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16), Utils.field(t17), Utils.field(t18), Utils.field(t19), Utils.field(t20)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row21 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16), Utils.field(t17), Utils.field(t18), Utils.field(t19), Utils.field(t20), Utils.field(t21)); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row22 row(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8, T9 t9, T10 t10, T11 t11, T12 t12, T13 t13, T14 t14, T15 t15, T16 t16, T17 t17, T18 t18, T19 t19, T20 t20, T21 t21, T22 t22) { return row(Utils.field(t1), Utils.field(t2), Utils.field(t3), Utils.field(t4), Utils.field(t5), Utils.field(t6), Utils.field(t7), Utils.field(t8), Utils.field(t9), Utils.field(t10), Utils.field(t11), Utils.field(t12), Utils.field(t13), Utils.field(t14), Utils.field(t15), Utils.field(t16), Utils.field(t17), Utils.field(t18), Utils.field(t19), Utils.field(t20), Utils.field(t21), Utils.field(t22)); } // [jooq-tools] END [row-value] /** * Create a row value expression of degree N > 22. *

* 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. */ @Support public static RowN row(Object... values) { return row(Utils.fields(values).toArray(new Field[0])); } // [jooq-tools] START [row-field] /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row1 row(Field t1) { return new RowImpl(t1); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row2 row(Field t1, Field t2) { return new RowImpl(t1, t2); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row3 row(Field t1, Field t2, Field t3) { return new RowImpl(t1, t2, t3); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row4 row(Field t1, Field t2, Field t3, Field t4) { return new RowImpl(t1, t2, t3, t4); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row5 row(Field t1, Field t2, Field t3, Field t4, Field t5) { return new RowImpl(t1, t2, t3, t4, t5); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row6 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6) { return new RowImpl(t1, t2, t3, t4, t5, t6); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row7 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row8 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row9 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row10 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row11 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row12 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row13 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row14 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row15 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row16 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row17 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16, Field t17) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row18 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16, Field t17, Field t18) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row19 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16, Field t17, Field t18, Field t19) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row20 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16, Field t17, Field t18, Field t19, Field t20) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row21 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16, Field t17, Field t18, Field t19, Field t20, Field t21) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21); } /** * 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 * value expression method Javadocs for details. */ @Generated("This method was generated using jOOQ-tools") @Support public static Row22 row(Field t1, Field t2, Field t3, Field t4, Field t5, Field t6, Field t7, Field t8, Field t9, Field t10, Field t11, Field t12, Field t13, Field t14, Field t15, Field t16, Field t17, Field t18, Field t19, Field t20, Field t21, Field t22) { return new RowImpl(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22); } // [jooq-tools] END [row-field] /** * Create a row value expression of degree N > 22. *

* 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. */ @Support public static RowN row(Field... values) { return new RowImpl(values); } /** * Create a row value expression of degree N > 22. *

* 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. */ @Support public static RowN row(Collection values) { Collection> fields = new ArrayList>(); for (Object o : values) fields.add(o instanceof Field ? (Field) o : val(o)); return new RowImpl(fields); } // ------------------------------------------------------------------------- // XXX [#915] VALUES() table constructors // ------------------------------------------------------------------------- /** * Create a VALUES() expression of arbitrary 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(val1_1, val1_2),
     *       (val2_1, val2_2),
     *       (val3_1, val3_2)
     * AS "v"("c1"  , "c2"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Support public static Table values(RowN... rows) { Values.assertNotEmpty(rows); int size = rows[0].size(); String[] columns = new String[size]; for (int i = 0; i < size; i++) columns[i] = "c" + i; return new Values(rows).as("v", columns); } // [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(val1_1),
     *       (val2_1),
     *       (val3_1)
     * AS "v"("c1"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1") UNION ALL
     * SELECT val1_1 AS "c1") UNION ALL
     * SELECT val1_1 AS "c1")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row1... rows) { return new Values>(rows).as("v", "c1"); } /** * 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(val1_1, val1_2),
     *       (val2_1, val2_2),
     *       (val3_1, val3_2)
     * AS "v"("c1"  , "c2"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row2... rows) { return new Values>(rows).as("v", "c1", "c2"); } /** * 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(val1_1, val1_2, val1_3),
     *       (val2_1, val2_2, val2_3),
     *       (val3_1, val3_2, val3_3)
     * AS "v"("c1"  , "c2"  , "c3"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row3... rows) { return new Values>(rows).as("v", "c1", "c2", "c3"); } /** * 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(val1_1, val1_2, val1_3, val1_4),
     *       (val2_1, val2_2, val2_3, val2_4),
     *       (val3_1, val3_2, val3_3, val3_4)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row4... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row5... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row6... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row7... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row8... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row9... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row10... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row11... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row12... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row13... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row14... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row15... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row16... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16, val1_17),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16, val2_17),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16, val3_17)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  , "c17"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row17... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16, val1_17, val1_18),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16, val2_17, val2_18),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16, val3_17, val3_18)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  , "c17"  , "c18"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row18... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17", "c18"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16, val1_17, val1_18, val1_19),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16, val2_17, val2_18, val2_19),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16, val3_17, val3_18, val3_19)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  , "c17"  , "c18"  , "c19"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row19... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17", "c18", "c19"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16, val1_17, val1_18, val1_19, val1_20),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16, val2_17, val2_18, val2_19, val2_20),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16, val3_17, val3_18, val3_19, val3_20)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  , "c17"  , "c18"  , "c19"  , "c20"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row20... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17", "c18", "c19", "c20"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16, val1_17, val1_18, val1_19, val1_20, val1_21),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16, val2_17, val2_18, val2_19, val2_20, val2_21),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16, val3_17, val3_18, val3_19, val3_20, val3_21)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  , "c17"  , "c18"  , "c19"  , "c20"  , "c21"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20", val1_21 AS "c21") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20", val1_21 AS "c21") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20", val1_21 AS "c21")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row21... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17", "c18", "c19", "c20", "c21"); } /** * 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(val1_1, val1_2, val1_3, val1_4, val1_5, val1_6, val1_7, val1_8, val1_9, val1_10, val1_11, val1_12, val1_13, val1_14, val1_15, val1_16, val1_17, val1_18, val1_19, val1_20, val1_21, val1_22),
     *       (val2_1, val2_2, val2_3, val2_4, val2_5, val2_6, val2_7, val2_8, val2_9, val2_10, val2_11, val2_12, val2_13, val2_14, val2_15, val2_16, val2_17, val2_18, val2_19, val2_20, val2_21, val2_22),
     *       (val3_1, val3_2, val3_3, val3_4, val3_5, val3_6, val3_7, val3_8, val3_9, val3_10, val3_11, val3_12, val3_13, val3_14, val3_15, val3_16, val3_17, val3_18, val3_19, val3_20, val3_21, val3_22)
     * AS "v"("c1"  , "c2"  , "c3"  , "c4"  , "c5"  , "c6"  , "c7"  , "c8"  , "c9"  , "c10"  , "c11"  , "c12"  , "c13"  , "c14"  , "c15"  , "c16"  , "c17"  , "c18"  , "c19"  , "c20"  , "c21"  , "c22"  )
     *
     * -- Using UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20", val1_21 AS "c21", val1_22 AS "c22") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20", val1_21 AS "c21", val1_22 AS "c22") UNION ALL
     * SELECT val1_1 AS "c1", val1_2 AS "c2", val1_3 AS "c3", val1_4 AS "c4", val1_5 AS "c5", val1_6 AS "c6", val1_7 AS "c7", val1_8 AS "c8", val1_9 AS "c9", val1_10 AS "c10", val1_11 AS "c11", val1_12 AS "c12", val1_13 AS "c13", val1_14 AS "c14", val1_15 AS "c15", val1_16 AS "c16", val1_17 AS "c17", val1_18 AS "c18", val1_19 AS "c19", val1_20 AS "c20", val1_21 AS "c21", val1_22 AS "c22")
     * 
*

* Use {@link Table#as(String, String...)} to rename the resulting table and * its columns. */ @Generated("This method was generated using jOOQ-tools") @Support public static Table> values(Row22... rows) { return new Values>(rows).as("v", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", "c17", "c18", "c19", "c20", "c21", "c22"); } // [jooq-tools] END [values] // ------------------------------------------------------------------------- // XXX Literals // ------------------------------------------------------------------------- /** * Get the null field. */ static Field NULL() { return field("null"); } /** * Null-safety of a field. */ protected static Field nullSafe(Field field) { return field == null ? val((T) null) : field; } /** * Null-safety of a field. */ protected static Field[] nullSafe(Field... fields) { if (fields == null) return new Field[0]; Field[] result = new Field[fields.length]; for (int i = 0; i < fields.length; i++) { result[i] = nullSafe(fields[i]); } return result; } /** * Get a default data type if a field is null. */ protected static DataType nullSafeDataType(Field field) { return (DataType) (field == null ? SQLDataType.OTHER : field.getDataType()); } /** * A 0 literal. *

* This is useful for mathematical functions or for * EXISTS (SELECT 0 ...) or PARTITION BY 0 clauses * and similar constructs. The 0 literal will not generate a * bind variable. * * @return A 0 literal as a Field */ @Support public static Field zero() { return inline(0); } /** * A 1 literal. *

* This is useful for mathematical functions or for * EXISTS (SELECT 1 ...) or PARTITION BY 1 clauses * and similar constructs. The 1 literal will not generate a * bind variable. * * @return A 1 literal as a Field */ @Support public static Field one() { return inline(1); } /** * A 2 literal. *

* This is useful for mathematical functions. The 1 literal * will not generate a bind variable. * * @return A 2 literal as a Field */ @Support public static Field two() { return inline(2); } /** * The PI literal. *

* This will be any of the following: *

    *
  • The underlying RDBMS' PI literal or PI() function
  • *
  • {@link Math#PI}
  • *
*/ @Support public static Field pi() { return new Pi(); } /** * The E literal (Euler number). *

* This will be any of the following: *

    *
  • The underlying RDBMS' E literal or E() function
  • *
  • {@link Math#E}
  • *
*/ @Support public static Field e() { return new Euler(); } // ------------------------------------------------------------------------- // XXX other functions // ------------------------------------------------------------------------- /** * Get the current_user() function. *

* This translates into any dialect */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) public static Field currentUser() { return new CurrentUser(); } /** * Get the default data type for the {@link DSLContext}'s underlying * {@link SQLDialect} and a given Java type. * * @param The generic type * @param type The Java type * @return The DSL's underlying default data type. */ @SuppressWarnings("deprecation") @Support public static DataType getDataType(Class type) { return DefaultDataType.getDataType(SQLDialect.SQL99, type); } /** * No instances. */ protected DSL() { throw new UnsupportedOperationException(); } /** * This constructor is no longer available in jOOQ 3.0. *

* See the jOOQ manual's section about migrating to jOOQ 3.0 */ @SuppressWarnings("unused") private DSL(Connection connection, SQLDialect dialect) { throw new UnsupportedOperationException(); } /** * This constructor is no longer available in jOOQ 3.0. *

* See the jOOQ manual's section about migrating to jOOQ 3.0 */ @SuppressWarnings("unused") private DSL(Connection connection, SQLDialect dialect, Settings settings) { throw new UnsupportedOperationException(); } /** * This constructor is no longer available in jOOQ 3.0. *

* See the jOOQ manual's section about migrating to jOOQ 3.0 */ @SuppressWarnings("unused") private DSL(DataSource datasource, SQLDialect dialect) { throw new UnsupportedOperationException(); } /** * This constructor is no longer available in jOOQ 3.0. *

* See the jOOQ manual's section about migrating to jOOQ 3.0 */ @SuppressWarnings("unused") private DSL(DataSource datasource, SQLDialect dialect, Settings settings) { throw new UnsupportedOperationException(); } /** * This constructor is no longer available in jOOQ 3.0. *

* See the jOOQ manual's section about migrating to jOOQ 3.0 */ @SuppressWarnings("unused") private DSL(SQLDialect dialect) { throw new UnsupportedOperationException(); } /** * This constructor is no longer available in jOOQ 3.0. *

* See the jOOQ manual's section about migrating to jOOQ 3.0 */ @SuppressWarnings("unused") private DSL(SQLDialect dialect, Settings settings) { throw new UnsupportedOperationException(); } }