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

org.jooq.Table Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com)
 * All rights reserved.
 *
 * 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.
 *
 * Other licenses:
 * -----------------------------------------------------------------------------
 * Commercial licenses for this work are available. These replace the above
 * ASL 2.0 and offer limited warranties, support, maintenance, and commercial
 * database integrations.
 *
 * For more information, please visit: http://www.jooq.org/licenses
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package org.jooq;

// ...
// ...
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.POSTGRES_9_3;
import static org.jooq.SQLDialect.SQLITE;
// ...
// ...
// ...

import java.sql.Timestamp;
import java.util.Collection;
import java.util.List;
import java.util.function.BiFunction;
import java.util.function.Function;

import org.jooq.conf.Settings;
import org.jooq.impl.DSL;

/**
 * A table to be used in queries
 *
 * @param  The record type associated with this table
 * @author Lukas Eder
 */
public interface Table extends TableLike {

    /**
     * Get the table catalog.
     */
    Catalog getCatalog();

    /**
     * Get the table schema.
     */
    Schema getSchema();

    /**
     * The name of this table.
     */
    String getName();

    /**
     * The comment given to the table.
     * 

* If this Table is a generated table from your database, it * may provide its DDL comment through this method. All other table * expressions return the empty string "" here, never * null. */ String getComment(); /** * The record type produced by this table. */ RecordType recordType(); /** * The record type produced by this table. */ Class getRecordType(); /** * The table's record type as a UDT data type, in case the underlying * database supports table records as UDT records. */ DataType getDataType(); /** * Create a new {@link Record} of this table's type. * * @see DSLContext#newRecord(Table) */ R newRecord(); /** * Retrieve the table's IDENTITY information, if available. *

* With SQL:2003, the concept of IDENTITY columns was * introduced in most RDBMS. These are special kinds of columns that have * auto-increment functionality when INSERT statements are * performed. *

* An IDENTITY column is usually part of the * PRIMARY KEY or of a UNIQUE KEY in the table, * although in some RDBMS, this is not required. There can only be at most * one IDENTITY column. *

* Note: Unfortunately, this is not supported in the Oracle dialect, where * identities emulated by triggers cannot be formally detected. * * @return The table's IDENTITY information, or * null, if no such information is available. */ Identity getIdentity(); /** * Retrieve the table's primary key * * @return The primary key. This is never null for an updatable * table. */ UniqueKey getPrimaryKey(); /** * A "version" field holding record version information used for optimistic * locking *

* jOOQ supports optimistic locking in {@link UpdatableRecord#store()} and * {@link UpdatableRecord#delete()} if * {@link Settings#isExecuteWithOptimisticLocking()} is enabled. Optimistic * locking is performed in a single UPDATE or * DELETE statement if tables provide a "version" or * "timestamp" field, or in two steps using an additional * SELECT .. FOR UPDATE statement otherwise. *

* This method is overridden in generated subclasses if their corresponding * tables have been configured accordingly. A table may have both a * "version" and a "timestamp" field. * * @return The "version" field, or null, if this table has no * "version" field. * @see #getRecordTimestamp() * @see UpdatableRecord#store() * @see UpdatableRecord#delete() * @see Settings#isExecuteWithOptimisticLocking() */ TableField getRecordVersion(); /** * A "timestamp" field holding record timestamp information used for * optimistic locking *

* jOOQ supports optimistic locking in {@link UpdatableRecord#store()} and * {@link UpdatableRecord#delete()} if * {@link Settings#isExecuteWithOptimisticLocking()} is enabled. Optimistic * locking is performed in a single UPDATE or * DELETE statement if tables provide a "version" or * "timestamp" field, or in two steps using an additional * SELECT .. FOR UPDATE statement otherwise. *

* This method is overridden in generated subclasses if their corresponding * tables have been configured accordingly. A table may have both a * "version" and a "timestamp" field. * * @return The "timestamp" field, or null, if this table has no * "timestamp" field. * @see #getRecordVersion() * @see UpdatableRecord#store() * @see UpdatableRecord#delete() * @see Settings#isExecuteWithOptimisticLocking() */ TableField getRecordTimestamp(); /** * Retrieve all of the table's unique keys. * * @return All keys. This is never null. This is never empty * for a {@link Table} with a {@link Table#getPrimaryKey()}. This * method returns an unmodifiable list. */ List> getKeys(); /** * Get a list of FOREIGN KEY's of a specific table, referencing * a this table. * * @param The other table's record type * @param other The other table of the foreign key relationship * @return Some other table's FOREIGN KEY's towards an this * table. This is never null. This method returns an * unmodifiable list. */ List> getReferencesFrom(Table other); /** * Get the list of FOREIGN KEY's of this table * * @return This table's FOREIGN KEY's. This is never * null. */ List> getReferences(); /** * Get a list of FOREIGN KEY's of this table, referencing a * specific table. * * @param The other table's record type * @param other The other table of the foreign key relationship * @return This table's FOREIGN KEY's towards an other table. * This is never null. */ List> getReferencesTo(Table other); // ------------------------------------------------------------------------- // XXX: Aliasing clauses // ------------------------------------------------------------------------- /** * Create an alias for this table. *

* Note that the case-sensitivity of the returned table depends on * {@link Settings#getRenderNameStyle()}. By default, table aliases are * quoted, and thus case-sensitive! * * @param alias The alias name * @return The table alias */ @Support Table as(String alias); /** * Create an alias for this table and its fields. *

* Note that the case-sensitivity of the returned table and columns depends * on {@link Settings#getRenderNameStyle()}. By default, table aliases are * quoted, and thus case-sensitive! *

*

Derived column lists for table references
*

* Note, not all databases support derived column lists for their table * aliases. On the other hand, some databases do support derived column * lists, but only for derived tables. jOOQ will try to turn table * references into derived tables to make this syntax work. In other words, * the following statements are equivalent:

     * -- Using derived column lists to rename columns (e.g. Postgres)
     * SELECT t.a, t.b
     * FROM my_table t(a, b)
     *
     * -- Nesting table references within derived tables (e.g. SQL Server)
     * SELECT t.a, t.b
     * FROM (
     *   SELECT * FROM my_table
     * ) t(a, b)
     * 
*

*

Derived column lists for derived tables
*

* Other databases may not support derived column lists at all, but they do * support common table expressions. The following statements are * equivalent:

     * -- Using derived column lists to rename columns (e.g. Postgres)
     * SELECT t.a, t.b
     * FROM (
     *   SELECT 1, 2
     * ) AS t(a, b)
     *
     * -- Using UNION ALL to produce column names (e.g. MySQL)
     * SELECT t.a, t.b
     * FROM (
     *   SELECT null a, null b FROM DUAL WHERE 1 = 0
     *   UNION ALL
     *   SELECT 1, 2 FROM DUAL
     * ) t
     * 
* * @param alias The alias name * @param fieldAliases The field aliases. Excess aliases are ignored, * missing aliases will be substituted by this table's field * names. * @return The table alias */ @Support Table as(String alias, String... fieldAliases); /** * Create an alias for this table and its fields. *

* This works like {@link #as(String, String...)}, except that field aliases * are provided by a function. This is useful, for instance, to prefix all * columns with a common prefix: *

*

     * MY_TABLE.as("t1", f -> "prefix_" + f.getName());
     * 
* * @param alias The alias name * @param aliasFunction The function providing field aliases. * @return The table alias */ @Support Table as(String alias, Function, ? extends String> aliasFunction); /** * Create an alias for this table and its fields. *

* This works like {@link #as(String, String...)}, except that field aliases * are provided by a function. This is useful, for instance, to prefix all * columns with a common prefix: *

*

     * MY_TABLE.as("t1", (f, i) -> "column" + i);
     * 
* * @param alias The alias name * @param aliasFunction The function providing field aliases. * @return The table alias */ @Support Table as(String alias, BiFunction, ? super Integer, ? extends String> aliasFunction); /** * Create an alias for this table based on another table's name. *

* Note that the case-sensitivity of the returned table depends on * {@link Settings#getRenderNameStyle()}. By default, table aliases are * quoted, and thus case-sensitive! * * @param otherTable The other table whose name this table is aliased with. * @return The table alias. */ @Support Table as(Table otherTable); /** * Create an alias for this table based on another table's name. *

* Note that the case-sensitivity of the returned table depends on * {@link Settings#getRenderNameStyle()}. By default, table aliases are * quoted, and thus case-sensitive! * * @param otherTable The other table whose name this table is aliased with. * @param otherFields The other fields whose field name this table's fields * are aliased with. * @return The table alias. */ @Support Table as(Table otherTable, Field... otherFields); /** * Create an alias for this table and its fields. *

* This works like {@link #as(String, String...)}, except that field aliases * are provided by a function. This is useful, for instance, to prefix all * columns with a common prefix: *

*

     * MY_TABLE.as(MY_OTHER_TABLE, f -> MY_OTHER_TABLE.field(f));
     * 
* * @param alias The alias name * @param aliasFunction The function providing field aliases. * @return The table alias */ @Support Table as(Table otherTable, Function, ? extends Field> aliasFunction); /** * Create an alias for this table and its fields. *

* This works like {@link #as(String, String...)}, except that field aliases * are provided by a function. This is useful, for instance, to prefix all * columns with a common prefix: *

*

     * MY_TABLE.as("t1", (f, i) -> "column" + i);
     * 
* * @param alias The alias name * @param aliasFunction The function providing field aliases. * @return The table alias */ @Support Table as(Table otherTable, BiFunction, ? super Integer, ? extends Field> aliasFunction); // ------------------------------------------------------------------------- // XXX: JOIN clauses on tables // ------------------------------------------------------------------------- /** * Join a table to this table using a {@link JoinType} *

* Depending on the JoinType, a subsequent * {@link TableOnStep#on(Condition...)} or * {@link TableOnStep#using(Field...)} clause is required. If it is required * but omitted, a {@link DSL#trueCondition()}, i.e. 1 = 1 * condition will be rendered */ @Support TableOptionalOnStep join(TableLike table, JoinType type); /** * INNER JOIN a table to this table. *

* A synonym for {@link #innerJoin(TableLike)}. * * @see #innerJoin(TableLike) */ @Support TableOnStep join(TableLike table); /** * INNER JOIN a table to this table. *

* A synonym for {@link #innerJoin(String)}. *

* 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! * * @see DSL#table(SQL) * @see #innerJoin(SQL) * @see SQL */ @Support @PlainSQL TableOnStep join(SQL sql); /** * INNER JOIN a table to this table. *

* A synonym for {@link #innerJoin(String)}. *

* 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! * * @see DSL#table(String) * @see #innerJoin(String) * @see SQL */ @Support @PlainSQL TableOnStep join(String sql); /** * INNER JOIN a table to this table. *

* A synonym for {@link #innerJoin(String, Object...)}. *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see #innerJoin(String, Object...) * @see SQL */ @Support @PlainSQL TableOnStep join(String sql, Object... bindings); /** * INNER JOIN a table to this table. *

* A synonym for {@link #innerJoin(String, QueryPart...)}. *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see #innerJoin(String, QueryPart...) * @see SQL */ @Support @PlainSQL TableOnStep join(String sql, QueryPart... parts); /** * INNER JOIN a table to this table. *

* A synonym for {@link #innerJoin(Name)}. * * @see DSL#table(Name) * @see #innerJoin(Name) */ @Support @PlainSQL TableOnStep join(Name name); /** * INNER JOIN a table to this table. */ @Support TableOnStep innerJoin(TableLike table); /** * INNER JOIN a table to this 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! * * @see DSL#table(SQL) * @see SQL */ @Support @PlainSQL TableOnStep innerJoin(SQL sql); /** * INNER JOIN a table to this 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! * * @see DSL#table(String) * @see SQL */ @Support @PlainSQL TableOnStep innerJoin(String sql); /** * INNER JOIN a table to this 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support @PlainSQL TableOnStep innerJoin(String sql, Object... bindings); /** * INNER JOIN a table to this 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support @PlainSQL TableOnStep innerJoin(String sql, QueryPart... parts); /** * INNER JOIN a table to this table. * * @see DSL#table(Name) */ @Support TableOnStep innerJoin(Name name); /** * LEFT OUTER JOIN a table to this table. *

* A synonym for {@link #leftOuterJoin(TableLike)}. * * @see #leftOuterJoin(TableLike) */ @Support TablePartitionByStep leftJoin(TableLike table); /** * LEFT OUTER JOIN a table to this table. *

* A synonym for {@link #leftOuterJoin(String)}. *

* 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! * * @see DSL#table(SQL) * @see #leftOuterJoin(SQL) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftJoin(SQL sql); /** * LEFT OUTER JOIN a table to this table. *

* A synonym for {@link #leftOuterJoin(String)}. *

* 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! * * @see DSL#table(String) * @see #leftOuterJoin(String) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftJoin(String sql); /** * LEFT OUTER JOIN a table to this table. *

* A synonym for {@link #leftOuterJoin(String, Object...)}. *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see #leftOuterJoin(String, Object...) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftJoin(String sql, Object... bindings); /** * LEFT OUTER JOIN a table to this table. *

* A synonym for {@link #leftOuterJoin(String, QueryPart...)}. *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see #leftOuterJoin(String, QueryPart...) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftJoin(String sql, QueryPart... parts); /** * LEFT OUTER JOIN a table to this table. *

* A synonym for {@link #leftOuterJoin(Name)}. * * @see DSL#table(Name) * @see #leftOuterJoin(Name) */ @Support TablePartitionByStep leftJoin(Name name); /** * LEFT OUTER JOIN a table to this table. */ @Support TablePartitionByStep leftOuterJoin(TableLike table); /** * LEFT OUTER JOIN a table to this 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! * * @see DSL#table(SQL) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftOuterJoin(SQL sql); /** * LEFT OUTER JOIN a table to this 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! * * @see DSL#table(String) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftOuterJoin(String sql); /** * LEFT OUTER JOIN a table to this 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftOuterJoin(String sql, Object... bindings); /** * LEFT OUTER JOIN a table to this 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support @PlainSQL TablePartitionByStep leftOuterJoin(String sql, QueryPart... parts); /** * LEFT OUTER JOIN a table to this table. * * @see DSL#table(Name) * @see SQL */ @Support TablePartitionByStep leftOuterJoin(Name name); /** * RIGHT OUTER JOIN a table to this table. *

* A synonym for {@link #rightOuterJoin(TableLike)}. *

* This is only possible where the underlying RDBMS supports it. * * @see #rightOuterJoin(TableLike) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) TablePartitionByStep rightJoin(TableLike table); /** * RIGHT OUTER JOIN a table to this table. *

* A synonym for {@link #rightOuterJoin(String)}. *

* This is only possible where the underlying RDBMS supports it. *

* 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! * * @see DSL#table(SQL) * @see #rightOuterJoin(SQL) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightJoin(SQL sql); /** * RIGHT OUTER JOIN a table to this table. *

* A synonym for {@link #rightOuterJoin(String)}. *

* This is only possible where the underlying RDBMS supports it. *

* 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! * * @see DSL#table(String) * @see #rightOuterJoin(String) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightJoin(String sql); /** * RIGHT OUTER JOIN a table to this table. *

* A synonym for {@link #rightOuterJoin(String, Object...)}. *

* This is only possible where the underlying RDBMS supports it. *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see #rightOuterJoin(String, Object...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightJoin(String sql, Object... bindings); /** * RIGHT OUTER JOIN a table to this table. *

* A synonym for {@link #rightOuterJoin(String, QueryPart...)}. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see #rightOuterJoin(String, QueryPart...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightJoin(String sql, QueryPart... parts); /** * RIGHT OUTER JOIN a table to this table. *

* A synonym for {@link #rightOuterJoin(Name)}. *

* This is only possible where the underlying RDBMS supports it * * @see DSL#table(Name) * @see #rightOuterJoin(Name) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) TablePartitionByStep rightJoin(Name name); /** * RIGHT OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) TablePartitionByStep rightOuterJoin(TableLike table); /** * RIGHT OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightOuterJoin(SQL sql); /** * RIGHT OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightOuterJoin(String sql); /** * RIGHT OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightOuterJoin(String sql, Object... bindings); /** * RIGHT OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL TablePartitionByStep rightOuterJoin(String sql, QueryPart... parts); /** * RIGHT OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it * * @see DSL#table(Name) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) TablePartitionByStep rightOuterJoin(Name name); /** * FULL OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) TableOnStep fullOuterJoin(TableLike table); /** * FULL OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) @PlainSQL TableOnStep fullOuterJoin(SQL sql); /** * FULL OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String) * @see SQL */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) @PlainSQL TableOnStep fullOuterJoin(String sql); /** * FULL OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) @PlainSQL TableOnStep fullOuterJoin(String sql, Object... bindings); /** * FULL OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) @PlainSQL TableOnStep fullOuterJoin(String sql, QueryPart... parts); /** * FULL OUTER JOIN a table to this table. *

* This is only possible where the underlying RDBMS supports it * * @see DSL#table(Name) */ @Support({ FIREBIRD, HSQLDB, POSTGRES }) TableOnStep fullOuterJoin(Name name); /** * CROSS JOIN a table to this table. *

* If this syntax is unavailable, it is emulated with a regular * INNER JOIN. The following two constructs are equivalent: *

     * A cross join B
     * A join B on 1 = 1
     * 
*/ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) Table crossJoin(TableLike table); /** * CROSS JOIN a table to this table. *

* If this syntax is unavailable, it is emulated with a regular * INNER JOIN. The following two constructs are equivalent: *

     * A cross join B
     * A join B on 1 = 1
     * 
*

* 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) @PlainSQL Table crossJoin(SQL sql); /** * CROSS JOIN a table to this table. *

* If this syntax is unavailable, it is emulated with a regular * INNER JOIN. The following two constructs are equivalent: *

     * A cross join B
     * A join B on 1 = 1
     * 
*

* 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! * * @see DSL#table(String) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) @PlainSQL Table crossJoin(String sql); /** * CROSS JOIN a table to this table. *

* If this syntax is unavailable, it is emulated with a regular * INNER JOIN. The following two constructs are equivalent: *

     * A cross join B
     * A join B on 1 = 1
     * 
*

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) @PlainSQL Table crossJoin(String sql, Object... bindings); /** * CROSS JOIN a table to this table. *

* If this syntax is unavailable, it is emulated with a regular * INNER JOIN. The following two constructs are equivalent: *

     * A cross join B
     * A join B on 1 = 1
     * 
*

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) @PlainSQL Table crossJoin(String sql, QueryPart... parts); /** * CROSS JOIN a table to this table. *

* If this syntax is unavailable, it is emulated with a regular * INNER JOIN. The following two constructs are equivalent: *

     * A cross join B
     * A join B on 1 = 1
     * 
* * @see DSL#table(Name) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE }) Table crossJoin(Name name); /** * NATURAL JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. */ @Support Table naturalJoin(TableLike table); /** * NATURAL JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(SQL) * @see SQL */ @Support @PlainSQL Table naturalJoin(SQL sql); /** * NATURAL JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String) * @see SQL */ @Support @PlainSQL Table naturalJoin(String sql); /** * NATURAL JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support @PlainSQL Table naturalJoin(String sql, Object... bindings); /** * NATURAL JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. * * @see DSL#table(Name) */ @Support Table naturalJoin(Name name); /** * NATURAL JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support @PlainSQL Table naturalJoin(String sql, QueryPart... parts); /** * NATURAL LEFT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. */ @Support Table naturalLeftOuterJoin(TableLike table); /** * NATURAL LEFT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(SQL) * @see SQL */ @Support @PlainSQL Table naturalLeftOuterJoin(SQL sql); /** * NATURAL LEFT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String) * @see SQL */ @Support @PlainSQL Table naturalLeftOuterJoin(String sql); /** * NATURAL LEFT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support @PlainSQL Table naturalLeftOuterJoin(String sql, Object... bindings); /** * NATURAL LEFT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support @PlainSQL Table naturalLeftOuterJoin(String sql, QueryPart... parts); /** * NATURAL LEFT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. * * @see DSL#table(Name) */ @Support @PlainSQL Table naturalLeftOuterJoin(Name name); /** * NATURAL RIGHT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) Table naturalRightOuterJoin(TableLike table); /** * NATURAL RIGHT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL Table naturalRightOuterJoin(SQL sql); /** * NATURAL RIGHT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL Table naturalRightOuterJoin(String sql); /** * NATURAL RIGHT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL Table naturalRightOuterJoin(String sql, Object... bindings); /** * NATURAL RIGHT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. *

* 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) @PlainSQL Table naturalRightOuterJoin(String sql, QueryPart... parts); /** * NATURAL RIGHT OUTER JOIN a table to this table. *

* If this is not supported by your RDBMS, then jOOQ will try to emulate * this behaviour using the information provided in this query. * * @see DSL#table(Name) */ @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES }) Table naturalRightOuterJoin(Name name); // ------------------------------------------------------------------------- // XXX: APPLY clauses on tables // ------------------------------------------------------------------------- /** * CROSS APPLY a table to this table. */ @Support({ POSTGRES_9_3 }) Table crossApply(TableLike table); /** * CROSS APPLY a table to this 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table crossApply(SQL sql); /** * CROSS APPLY a table to this 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! * * @see DSL#table(String) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table crossApply(String sql); /** * CROSS APPLY a table to this 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table crossApply(String sql, Object... bindings); /** * CROSS APPLY a table to this 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table crossApply(String sql, QueryPart... parts); /** * CROSS APPLY a table to this table. * * @see DSL#table(Name) */ @Support({ POSTGRES_9_3 }) Table crossApply(Name name); /** * OUTER APPLY a table to this table. */ @Support({ POSTGRES_9_3 }) Table outerApply(TableLike table); /** * OUTER APPLY a table to this 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table outerApply(SQL sql); /** * OUTER APPLY a table to this 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! * * @see DSL#table(String) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table outerApply(String sql); /** * OUTER APPLY a table to this 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table outerApply(String sql, Object... bindings); /** * OUTER APPLY a table to this 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ POSTGRES_9_3 }) @PlainSQL Table outerApply(String sql, QueryPart... parts); /** * OUTER APPLY a table to this table. * * @see DSL#table(Name) */ @Support({ POSTGRES_9_3 }) Table outerApply(Name name); /** * STRAIGHT_JOIN a table to this table. */ @Support({ MYSQL }) TableOnStep straightJoin(TableLike table); /** * STRAIGHT_JOIN a table to this 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! * * @see DSL#table(SQL) * @see SQL */ @Support({ MYSQL }) @PlainSQL TableOnStep straightJoin(SQL sql); /** * STRAIGHT_JOIN a table to this 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! * * @see DSL#table(String) * @see SQL */ @Support({ MYSQL }) @PlainSQL TableOnStep straightJoin(String sql); /** * STRAIGHT_JOIN a table to this 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! * * @see DSL#table(String, Object...) * @see DSL#sql(String, Object...) * @see SQL */ @Support({ MYSQL }) @PlainSQL TableOnStep straightJoin(String sql, Object... bindings); /** * STRAIGHT_JOIN a table to this 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! * * @see DSL#table(String, QueryPart...) * @see DSL#sql(String, QueryPart...) * @see SQL */ @Support({ MYSQL }) @PlainSQL TableOnStep straightJoin(String sql, QueryPart... parts); /** * STRAIGHT_JOIN a table to this table. * * @see DSL#table(Name) */ @Support({ MYSQL }) @PlainSQL TableOnStep straightJoin(Name name); // ------------------------------------------------------------------------- // XXX: Convenience methods and synthetic methods // ------------------------------------------------------------------------- /** * Create a predicate comparing records from self-joined tables. *

* This is a convenience method for self-joins, comparing complete records * between tables. *

* For example:

     * MyTable a = MY_TABLE.as("a");
     * MyTable b = MY_TABLE.as("b");
     *
     * DSL.using(configuration)
     *    .select()
     *    .from(a)
     *    .join(b).on(a.eq(b));
     * 
* * @see #equal(Table) */ @Support Condition eq(Table table); /** * Create a predicate comparing records from self-joined tables. *

* This is a convenience method for self-joins, comparing complete records * between tables. *

* For example: *

     * MyTable a = MY_TABLE.as("a");
     * MyTable b = MY_TABLE.as("b");
     *
     * DSL.using(configuration)
     *    .select()
     *    .from(a)
     *    .join(b).on(a.equal(b));
     * 
*/ @Support Condition equal(Table table); /** * {@inheritDoc} *

* Watch out! This is {@link Object#equals(Object)}, not a jOOQ DSL * feature! */ @Override boolean equals(Object other); /** * Create a predicate comparing records from self-non-equi-joined tables. * This is a convenience method for self-joins, comparing complete records * between tables. *

* For example: *

     * MyTable a = MY_TABLE.as("a");
     * MyTable b = MY_TABLE.as("b");
     *
     * DSL.using(configuration)
     *    .select()
     *    .from(a)
     *    .join(b).on(a.ne(b));
     * 
* * @see #notEqual(Table) */ @Support Condition ne(Table table); /** * Create a predicate comparing records from self-non-equi-joined tables. *

* This is a convenience method for self-joins, comparing complete records * between tables. *

* For example: *

     * MyTable a = MY_TABLE.as("a");
     * MyTable b = MY_TABLE.as("b");
     *
     * DSL.using(configuration)
     *    .select()
     *    .from(a)
     *    .join(b).on(a.notEqual(b));
     * 
*/ @Support Condition notEqual(Table table); // ------------------------------------------------------------------------- // XXX: Exotic and vendor-specific clauses on tables // ------------------------------------------------------------------------- /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndex("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table useIndex(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForJoin("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table useIndexForJoin(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForOrderBy("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table useIndexForOrderBy(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForGroupBy("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table useIndexForGroupBy(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndex("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table ignoreIndex(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForJoin("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table ignoreIndexForJoin(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForOrderBy("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table ignoreIndexForOrderBy(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForGroupBy("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table ignoreIndexForGroupBy(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndex("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table forceIndex(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForJoin("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table forceIndexForJoin(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForOrderBy("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table forceIndexForOrderBy(String... indexes); /** * Specify a MySQL style table hint for query optimisation. *

* Example: *

*

     * create.select()
     *       .from(BOOK.as("b").useIndexForGroupBy("MY_INDEX")
     *       .fetch();
     * 
* * @see http://dev.mysql.com/doc/refman/5.7/en/index-hints.html */ @Support({ MARIADB, MYSQL }) Table forceIndexForGroupBy(String... indexes); /** * Create a new TABLE reference from this table, applying * relational division. *

* Relational division is the inverse of a cross join operation. The * following is an approximate definition of a relational division: *

     * Assume the following cross join / cartesian product
     * C = A × B
     *
     * Then it can be said that
     * A = C ÷ B
     * B = C ÷ A
     * 
*

* With jOOQ, you can simplify using relational divisions by using the * following syntax:

     * C.divideBy(B).on(C.ID.equal(B.C_ID)).returning(C.TEXT)
     * 
*

* The above roughly translates to

     * SELECT DISTINCT C.TEXT FROM C "c1"
     * WHERE NOT EXISTS (
     *   SELECT 1 FROM B
     *   WHERE NOT EXISTS (
     *     SELECT 1 FROM C "c2"
     *     WHERE "c2".TEXT = "c1".TEXT
     *     AND "c2".ID = B.C_ID
     *   )
     * )
     * 
*

* Or in plain text: Find those TEXT values in C whose ID's correspond to * all ID's in B. Note that from the above SQL statement, it is immediately * clear that proper indexing is of the essence. Be sure to have indexes on * all columns referenced from the on(...) and * returning(...) clauses. *

* For more information about relational division and some nice, real-life * examples, see *

*

* This has been observed to work with all dialects */ @Support DivideByOnStep divideBy(Table divisor); /** * A synthetic LEFT SEMI JOIN clause that translates to an * equivalent EXISTS predicate. *

* The following two SQL snippets are semantically equivalent: *

     * -- Using LEFT SEMI JOIN
     * FROM A
     *     LEFT SEMI JOIN B
     *         ON A.ID = B.ID
     *
     * -- Using WHERE EXISTS
     * FROM A
     * WHERE EXISTS (
     *     SELECT 1 FROM B WHERE A.ID = B.ID
     * )
     * 
*/ @Support TableOnStep leftSemiJoin(TableLike table); /** * A synthetic LEFT ANTI JOIN clause that translates to an * equivalent NOT EXISTS predicate. *

* The following two SQL snippets are semantically equivalent: *

     * -- Using LEFT ANTI JOIN
     * FROM A
     *     LEFT ANTI JOIN B
     *         ON A.ID = B.ID
     *
     * -- Using WHERE NOT EXISTS
     * FROM A
     * WHERE NOT EXISTS (
     *     SELECT 1 FROM B WHERE A.ID = B.ID
     * )
     * 
*/ @Support TableOnStep leftAntiJoin(TableLike table); // ------------------------------------------------------------------------ // [#5518] Record method inversions, e.g. for use as method references // ------------------------------------------------------------------------ /** * The inverse operation of {@link Record#into(Table)}. *

* This method can be used in its method reference form conveniently on a * generated table, for instance, when mapping records in a stream: *

     * DSL.using(configuration)
     *    .fetch("select * from t")
     *    .stream()
     *    .map(MY_TABLE::into)
     *    .forEach(System.out::println);
     * 
*/ R from(Record record); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy