Module org.jooq
Package org.jooq.impl

Class CustomTable<R extends TableRecord<R>>

    • Method Detail

      • getRecordType

        public abstract Class<? extends R> getRecordType()
        Subclasses must implement this method
        Subclasses must override this method if they use the generic type parameter for other types than Record

        The record type produced by this table.

        Specified by:
        getRecordType in interface Table<R extends TableRecord<R>>
        Overrides:
        getRecordType in class TableImpl<R extends TableRecord<R>>
      • getIdentity

        public Identity<R,​?> getIdentity()
        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.

        Subclasses should override this method

        Specified by:
        getIdentity in interface Table<R extends TableRecord<R>>
        Returns:
        The table's IDENTITY information, or null, if no such information is available.
      • getPrimaryKey

        public UniqueKey<R> getPrimaryKey()
        Retrieve the table's primary key

        Subclasses may override this method

        Specified by:
        getPrimaryKey in interface Table<R extends TableRecord<R>>
        Returns:
        The primary key. This is never null for an updatable table.
      • getKeys

        public List<UniqueKey<R>> getKeys()
        Retrieve all of the table's unique keys.

        Subclasses should override this method

        Specified by:
        getKeys in interface Table<R extends TableRecord<R>>
        Returns:
        All keys. This is never null. This is never empty for a Table with a Table.getPrimaryKey(). This method returns an unmodifiable list.
      • getReferences

        public List<ForeignKey<R,​?>> getReferences()
        Get the list of FOREIGN KEY's of this table

        Subclasses should override this method

        Specified by:
        getReferences in interface Table<R extends TableRecord<R>>
        Returns:
        This table's FOREIGN KEY's. This is never null.
      • from

        public final R from​(Record record)
        Description copied from interface: Table
        The inverse operation of 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);
         
        Specified by:
        from in interface Table<R extends Record>
      • rowid

        public final Field<RowId> rowid()
        Description copied from interface: Table
        Get a table.rowid reference from this table.

        A rowid value describes the physical location of a row on the disk, which can be used as a replacement for a primary key in some situations - especially within a query, e.g. to self-join a table:

         -- Emulating this MySQL statement...
         DELETE FROM x ORDER BY x.y LIMIT 1
        
         -- ... in other databases
         DELETE FROM x
         WHERE x.rowid IN (
           SELECT x.rowid FROM x ORDER BY x.a LIMIT 1
         )
         

        It is not recommended to use rowid values in client applications as actual row identifiers as the database system may move a row to a different physical location at any time, thus changing the rowid value. In general, use primary keys, instead.

        Specified by:
        rowid in interface Table<R extends Record>
      • getDataType

        public final DataType<R> getDataType()
        Description copied from interface: Table
        The table's record type as a UDT data type, in case the underlying database supports table records as UDT records.
        Specified by:
        getDataType in interface Table<R extends Record>
      • recordType

        public final RecordType<R> recordType()
        Description copied from interface: Table
        The record type produced by this table.
        Specified by:
        recordType in interface Table<R extends Record>
      • field

        public final <T> Field<T> field​(Field<T> field)
        Description copied from interface: TableLike
        Get a specific field from this table, if this table knows its field references.

        This will return:

        • A field that is the same as the argument field (by identity comparison).
        • A field that is equal to the argument field (exact matching fully qualified name).
        • A field that is equal to the argument field (partially matching qualified name).
        • A field whose name is equal to the name of the argument field.
        • null otherwise.
        If several fields have the same name, the first one is returned and a warning is logged.
        Specified by:
        field in interface TableLike<R extends Record>
        See Also:
        Row.field(Field)
      • field

        public final Field<?> field​(Name name)
        Description copied from interface: TableLike
        Get a specific field from this table, if this table knows its field references.
        Specified by:
        field in interface TableLike<R extends Record>
        See Also:
        Row.field(Name)
      • field

        public final Field<?> field​(int index)
        Description copied from interface: TableLike
        Get a specific field from this table, if this table knows its field references.
        Specified by:
        field in interface TableLike<R extends Record>
        See Also:
        Row.field(int)
      • field

        public final <T> Field<T> field​(int index,
                                        Class<T> type)
        Description copied from interface: TableLike
        Get a specific field from this table and coerce it to type, if this table knows its field references.
        Specified by:
        field in interface TableLike<R extends Record>
        See Also:
        Row.field(int, Class)
      • field

        public final <T> Field<T> field​(int index,
                                        DataType<T> dataType)
        Description copied from interface: TableLike
        Get a specific field from this table and coerce it to dataType, if this table knows its field references.
        Specified by:
        field in interface TableLike<R extends Record>
        See Also:
        Row.field(int, DataType)
      • fields

        public final Field<?>[] fields()
        Description copied from interface: TableLike
        Get all fields from this table, if this table knows its field references, or an empty array otherwise.
        Specified by:
        fields in interface TableLike<R extends Record>
        See Also:
        Row.fields()
      • fields

        public final Field<?>[] fields​(Field<?>... fields)
        Description copied from interface: TableLike
        Get all fields from this table, providing some fields, if this table knows its field references.
        Specified by:
        fields in interface TableLike<R extends Record>
        Returns:
        All available fields
        See Also:
        Row.fields(Field...)
      • fields

        public final Field<?>[] fields​(String... fieldNames)
        Description copied from interface: TableLike
        Get all fields from this table, providing some field names, if this table knows its field references.
        Specified by:
        fields in interface TableLike<R extends Record>
        Returns:
        All available fields
        See Also:
        Row.fields(String...)
      • fields

        public final Field<?>[] fields​(Name... fieldNames)
        Description copied from interface: TableLike
        Get all fields from this table, providing some field names, if this table knows its field references.
        Specified by:
        fields in interface TableLike<R extends Record>
        Returns:
        All available fields
        See Also:
        Row.fields(Name...)
      • fields

        public final Field<?>[] fields​(int... fieldIndexes)
        Description copied from interface: TableLike
        Get all fields from this table, providing some field indexes, if this table knows its field references.
        Specified by:
        fields in interface TableLike<R extends Record>
        Returns:
        All available fields
        See Also:
        Row.fields(int...)
      • indexOf

        public final int indexOf​(Field<?> field)
        Description copied from interface: TableLike
        Get a field's index from this table.
        Specified by:
        indexOf in interface TableLike<R extends Record>
        Parameters:
        field - The field to look for
        Returns:
        The field's index or -1 if the field is not contained in this table.
      • indexOf

        public final int indexOf​(String fieldName)
        Description copied from interface: TableLike
        Get a field's index from this table.
        Specified by:
        indexOf in interface TableLike<R extends Record>
        Parameters:
        fieldName - The field name to look for
        Returns:
        The field's index or -1 if the field is not contained in this table.
      • indexOf

        public final int indexOf​(Name fieldName)
        Description copied from interface: TableLike
        Get a field's index from this table.
        Specified by:
        indexOf in interface TableLike<R extends Record>
        Parameters:
        fieldName - The field name to look for
        Returns:
        The field's index or -1 if the field is not contained in this table
      • asTable

        public final Table<R> asTable()
        Description copied from interface: TableLike
        The underlying table representation of this object.

        This method is useful for things like SELECT * FROM (SELECT * FROM x WHERE x.a = '1') WHERE ...

        Specified by:
        asTable in interface TableLike<R extends Record>
      • as

        public Table<R> as​(String alias)
        Description copied from interface: Table
        Create an alias for this table.

        Note that the case-sensitivity of the returned table depends on Settings.getRenderQuotedNames(). By default, table aliases are quoted, and thus case-sensitive in many SQL dialects!

        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        alias - The alias name
        Returns:
        The table alias
      • as

        public Table<R> as​(String alias,
                           String... fieldAliases)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        Note that the case-sensitivity of the returned table and columns depends on Settings.getRenderQuotedNames(). By default, table aliases are quoted, and thus case-sensitive in many SQL dialects!

        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
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        alias - The alias name
        fieldAliases - The field aliases. Excess aliases are ignored, missing aliases will be substituted by this table's field names.
        Returns:
        The table alias
      • as

        public final Table<R> as​(String alias,
                                 Function<? super Field<?>,​? extends String> aliasFunction)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        This works like Table.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());
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        alias - The alias name
        aliasFunction - The function providing field aliases.
        Returns:
        The table alias
      • as

        public final Table<R> as​(String alias,
                                 BiFunction<? super Field<?>,​? super Integer,​? extends String> aliasFunction)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        This works like Table.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);
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        alias - The alias name
        aliasFunction - The function providing field aliases.
        Returns:
        The table alias
      • as

        public final Table<R> as​(Name alias,
                                 Function<? super Field<?>,​? extends Name> aliasFunction)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        This works like Table.as(Name, Name...), 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());
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        alias - The alias name
        aliasFunction - The function providing field aliases.
        Returns:
        The table alias
      • as

        public final Table<R> as​(Name alias,
                                 BiFunction<? super Field<?>,​? super Integer,​? extends Name> aliasFunction)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        This works like Table.as(Name, Name...), 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);
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        alias - The alias name
        aliasFunction - The function providing field aliases.
        Returns:
        The table alias
      • getCatalog

        public final Catalog getCatalog()
        Description copied from interface: Table
        Get the table catalog.
        Specified by:
        getCatalog in interface Table<R extends Record>
      • getSchema

        public Schema getSchema()
        Description copied from interface: Table
        Get the table schema.
        Specified by:
        getSchema in interface Table<R extends Record>
      • getIndexes

        public List<Index> getIndexes()
        Retrieve all of the table's indexes.

        Subclasses should override this method

        Specified by:
        getIndexes in interface Table<R extends Record>
        Returns:
        All indexes. This is never null. This method returns an unmodifiable list.
      • getReferencesFrom

        public final <O extends RecordList<ForeignKey<O,​R>> getReferencesFrom​(Table<O> other)
        Description copied from interface: Table
        Get a list of FOREIGN KEY's of a specific table, referencing a this table.
        Specified by:
        getReferencesFrom in interface Table<R extends Record>
        Type Parameters:
        O - The other table's record type
        Parameters:
        other - The other table of the foreign key relationship
        Returns:
        Some other table's FOREIGN KEY's towards an this table. This is never null. This method returns an unmodifiable list.
      • getReferencesTo

        public final <O extends RecordList<ForeignKey<R,​O>> getReferencesTo​(Table<O> other)
        Description copied from interface: Table
        Get a list of FOREIGN KEY's of this table, referencing a specific table.
        Specified by:
        getReferencesTo in interface Table<R extends Record>
        Type Parameters:
        O - The other table's record type
        Parameters:
        other - The other table of the foreign key relationship
        Returns:
        This table's FOREIGN KEY's towards an other table. This is never null.
      • createField

        @Deprecated
        protected static final <R extends Record,​T> TableField<R,​T> createField​(String name,
                                                                                            DataType<T> type,
                                                                                            Table<R> table)
        Deprecated.
        - 3.12.0 - [#8000] - Use AbstractTable.createField(Name, DataType, Table) instead.
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        @Deprecated
        protected static final <R extends Record,​T> TableField<R,​T> createField​(String name,
                                                                                            DataType<T> type,
                                                                                            Table<R> table,
                                                                                            String comment)
        Deprecated.
        - 3.12.0 - [#8000] - Use AbstractTable.createField(Name, DataType, Table, String) instead.
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        @Deprecated
        protected static final <R extends Record,​T,​U> TableField<R,​U> createField​(String name,
                                                                                                    DataType<T> type,
                                                                                                    Table<R> table,
                                                                                                    String comment,
                                                                                                    Converter<T,​U> converter)
        Deprecated.
        - 3.12.0 - [#8000] - Use AbstractTable.createField(Name, DataType, Table, String, Converter) instead.
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        @Deprecated
        protected static final <R extends Record,​T,​U> TableField<R,​U> createField​(String name,
                                                                                                    DataType<T> type,
                                                                                                    Table<R> table,
                                                                                                    String comment,
                                                                                                    Binding<T,​U> binding)
        Deprecated.
        - 3.12.0 - [#8000] - Use AbstractTable.createField(Name, DataType, Table, String, Binding) instead.
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        @Deprecated
        protected static final <R extends Record,​T,​X,​U> TableField<R,​U> createField​(String name,
                                                                                                            DataType<T> type,
                                                                                                            Table<R> table,
                                                                                                            String comment,
                                                                                                            Converter<X,​U> converter,
                                                                                                            Binding<T,​X> binding)
        Deprecated.
        - 3.12.0 - [#8000] - Use AbstractTable.createField(Name, DataType, Table, String, Converter, Binding) instead.
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        @Deprecated
        protected final <T> TableField<R,​T> createField​(String name,
                                                              DataType<T> type)
        Deprecated.
        - 3.12.0 - [#8000] - Use createField(Name, DataType) instead.
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected static final <R extends Record,​T> TableField<R,​T> createField​(Name name,
                                                                                            DataType<T> type,
                                                                                            Table<R> table)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected static final <R extends Record,​T> TableField<R,​T> createField​(Name name,
                                                                                            DataType<T> type,
                                                                                            Table<R> table,
                                                                                            String comment)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected static final <R extends Record,​T,​U> TableField<R,​U> createField​(Name name,
                                                                                                    DataType<T> type,
                                                                                                    Table<R> table,
                                                                                                    String comment,
                                                                                                    Converter<T,​U> converter)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected static final <R extends Record,​T,​U> TableField<R,​U> createField​(Name name,
                                                                                                    DataType<T> type,
                                                                                                    Table<R> table,
                                                                                                    String comment,
                                                                                                    Binding<T,​U> binding)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected static final <R extends Record,​T,​X,​U> TableField<R,​U> createField​(Name name,
                                                                                                            DataType<T> type,
                                                                                                            Table<R> table,
                                                                                                            String comment,
                                                                                                            Converter<X,​U> converter,
                                                                                                            Binding<T,​X> binding)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected final <T> TableField<R,​T> createField​(Name name,
                                                              DataType<T> type)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected final <T> TableField<R,​T> createField​(Name name,
                                                              DataType<T> type,
                                                              String comment)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected final <T,​U> TableField<R,​U> createField​(Name name,
                                                                      DataType<T> type,
                                                                      String comment,
                                                                      Converter<T,​U> converter)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected final <T,​U> TableField<R,​U> createField​(Name name,
                                                                      DataType<T> type,
                                                                      String comment,
                                                                      Binding<T,​U> binding)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • createField

        protected final <T,​X,​U> TableField<R,​U> createField​(Name name,
                                                                              DataType<T> type,
                                                                              String comment,
                                                                              Converter<X,​U> converter,
                                                                              Binding<T,​X> binding)
        Subclasses may call this method to create TableField objects that are linked to this table.
        Parameters:
        name - The name of the field (case-sensitive!)
        type - The data type of the field
      • eq

        public final Condition eq​(Table<R> that)
        Description copied from interface: 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.eq(b));
         
        Specified by:
        eq in interface Table<R extends Record>
        See Also:
        Table.equal(Table)
      • equal

        public final Condition equal​(Table<R> that)
        Description copied from interface: 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));
         
        Specified by:
        equal in interface Table<R extends Record>
      • ne

        public final Condition ne​(Table<R> that)
        Description copied from interface: 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.ne(b));
         
        Specified by:
        ne in interface Table<R extends Record>
        See Also:
        Table.notEqual(Table)
      • notEqual

        public final Condition notEqual​(Table<R> that)
        Description copied from interface: 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));
         
        Specified by:
        notEqual in interface Table<R extends Record>
      • as

        public final Table<R> as​(Table<?> otherTable)
        Description copied from interface: Table
        Create an alias for this table based on another table's name.
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        otherTable - The other table whose name this table is aliased with.
        Returns:
        The table alias.
      • as

        public final Table<R> as​(Table<?> otherTable,
                                 Field<?>... otherFields)
        Description copied from interface: Table
        Create an alias for this table based on another table's name.
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        otherTable - The other table whose name this table is aliased with.
        otherFields - The other fields whose field name this table's fields are aliased with.
        Returns:
        The table alias.
      • as

        public final Table<R> as​(Table<?> otherTable,
                                 Function<? super Field<?>,​? extends Field<?>> aliasFunction)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        This works like Table.as(Table, Field...), 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));
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        otherTable - The other table whose name is used as alias name
        aliasFunction - The function providing field aliases.
        Returns:
        The table alias
      • as

        public final Table<R> as​(Table<?> otherTable,
                                 BiFunction<? super Field<?>,​? super Integer,​? extends Field<?>> aliasFunction)
        Description copied from interface: Table
        Create an alias for this table and its fields.

        This works like Table.as(Table, Field...), 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);
         
        Specified by:
        as in interface Table<R extends Record>
        Parameters:
        otherTable - The other table whose name is used as alias name
        aliasFunction - The function providing field aliases.
        Returns:
        The table alias
      • at

        @Pro
        public final Table<R> at​(Link link)
        Description copied from interface: Table
        A table reference of this table at a given Link.
        Specified by:
        at in interface Table<R extends Record>
      • pivot

        @Pro
        public final PivotForStep pivot​(Field<?>... aggregateFunctions)
        Description copied from interface: Table
        Create a new TABLE reference from this table, pivoting it into another form.

        This has been observed to work with

        Specified by:
        pivot in interface Table<R extends Record>
        Parameters:
        aggregateFunctions - The aggregate functions used for pivoting.
        Returns:
        A DSL object to create the PIVOT expression
      • pivot

        @Pro
        public final PivotForStep pivot​(Collection<? extends Field<?>> aggregateFunctions)
        Description copied from interface: Table
        Create a new TABLE reference from this table, pivoting it into another form.

        For more details, see Table.pivot(Field...)

        Specified by:
        pivot in interface Table<R extends Record>
        Parameters:
        aggregateFunctions - The aggregate functions used for pivoting.
        Returns:
        A DSL object to create the PIVOT expression
        See Also:
        Table.pivot(Field...)
      • divideBy

        public final DivideByOnStep divideBy​(Table<?> divisor)
        Description copied from interface: Table
        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

        Specified by:
        divideBy in interface Table<R extends Record>
      • leftSemiJoin

        public final TableOnStep<R> leftSemiJoin​(TableLike<?> table)
        Description copied from interface: Table
        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
         )
         

        Notice that according to Relational algebra's understanding of left semi join, the right hand side of the left semi join operator is not projected, i.e. it cannot be accessed from WHERE or SELECT or any other clause than ON.

        Specified by:
        leftSemiJoin in interface Table<R extends Record>
      • leftAntiJoin

        public final TableOnStep<R> leftAntiJoin​(TableLike<?> table)
        Description copied from interface: 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
         )
         

        Notice that according to Relational algebra's understanding of left anti join, the right hand side of the left anti join operator is not projected, i.e. it cannot be accessed from WHERE or SELECT or any other clause than ON.

        Specified by:
        leftAntiJoin in interface Table<R extends Record>
      • where

        public Table<R> where​(Condition condition)
        Description copied from interface: Table
        Add a WHERE clause to the table, connecting them with each other with Operator.AND.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting table.

        Specified by:
        where in interface Table<R extends Record>
      • where

        public Table<R> where​(Condition... conditions)
        Description copied from interface: Table
        Add a WHERE clause to the table, connecting them with each other with Operator.AND.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting table.

        Specified by:
        where in interface Table<R extends Record>
      • where

        public Table<R> where​(Collection<? extends Condition> conditions)
        Description copied from interface: Table
        Add a WHERE clause to the table, connecting them with each other with Operator.AND.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting table.

        Specified by:
        where in interface Table<R extends Record>
      • where

        public Table<R> where​(Field<Boolean> field)
        Description copied from interface: Table
        Add a WHERE clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting table.

        Specified by:
        where in interface Table<R extends Record>
      • where

        public Table<R> where​(SQL sql)
        Description copied from interface: Table
        Add a WHERE clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting 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!

        Specified by:
        where in interface Table<R extends Record>
        See Also:
        DSL.condition(SQL), SQL
      • where

        public Table<R> where​(String sql)
        Description copied from interface: Table
        Add a WHERE clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting 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!

        Specified by:
        where in interface Table<R extends Record>
        See Also:
        DSL.condition(String), SQL
      • where

        public Table<R> where​(String sql,
                              Object... bindings)
        Description copied from interface: Table
        Add a WHERE clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting 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!

        Specified by:
        where in interface Table<R extends Record>
        See Also:
        DSL.condition(String, Object...), DSL.sql(String, Object...), SQL
      • where

        public Table<R> where​(String sql,
                              QueryPart... parts)
        Description copied from interface: Table
        Add a WHERE clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting 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!

        Specified by:
        where in interface Table<R extends Record>
        See Also:
        DSL.condition(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • whereExists

        public Table<R> whereExists​(Select<?> select)
        Description copied from interface: Table
        Add a WHERE EXISTS clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting table.

        Specified by:
        whereExists in interface Table<R extends Record>
      • whereNotExists

        public Table<R> whereNotExists​(Select<?> select)
        Description copied from interface: Table
        Add a WHERE NOT EXISTS clause to the table.

        The resulting table acts like a derived table that projects all of this table's columns and filters by the argument Condition. If syntactically reasonable, the derived table may be inlined to the query that selects from the resulting table.

        Specified by:
        whereNotExists in interface Table<R extends Record>
      • join

        public final TableOnStep<Record> join​(SQL sql)
        Description copied from interface: Table
        INNER JOIN a table to this table.

        A synonym for Table.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!

        Specified by:
        join in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), Table.innerJoin(SQL), SQL
      • innerJoin

        public final TableOnStep<Record> innerJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        innerJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • innerJoin

        public final TableOnStep<Record> innerJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        innerJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • leftOuterJoin

        public final TablePartitionByStep<Record> leftOuterJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        leftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • leftOuterJoin

        public final TablePartitionByStep<Record> leftOuterJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        leftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • rightJoin

        public final TablePartitionByStep<Record> rightJoin​(SQL sql)
        Description copied from interface: Table
        RIGHT OUTER JOIN a table to this table.

        A synonym for Table.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!

        Specified by:
        rightJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), Table.rightOuterJoin(SQL), SQL
      • rightOuterJoin

        public final TablePartitionByStep<Record> rightOuterJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        rightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • rightOuterJoin

        public final TablePartitionByStep<Record> rightOuterJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        rightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • rightOuterJoin

        public final TablePartitionByStep<Record> rightOuterJoin​(String sql,
                                                                 Object... bindings)
        Description copied from interface: 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!

        Specified by:
        rightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • fullOuterJoin

        public final TableOnStep<Record> fullOuterJoin​(TableLike<?> table)
        Description copied from interface: Table
        FULL OUTER JOIN a table to this table.

        This is only possible where the underlying RDBMS supports it

        Specified by:
        fullOuterJoin in interface Table<R extends Record>
      • fullOuterJoin

        public final TableOnStep<Record> fullOuterJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        fullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • fullOuterJoin

        public final TableOnStep<Record> fullOuterJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        fullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • fullOuterJoin

        public final TableOnStep<Record> fullOuterJoin​(String sql,
                                                       Object... bindings)
        Description copied from interface: 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!

        Specified by:
        fullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • fullOuterJoin

        public final TableOnStep<Record> fullOuterJoin​(String sql,
                                                       QueryPart... parts)
        Description copied from interface: 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!

        Specified by:
        fullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • fullJoin

        public final TableOnStep<Record> fullJoin​(SQL sql)
        Description copied from interface: Table
        FULL OUTER JOIN a table to this table.

        A synonym for Table.fullOuterJoin(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!

        Specified by:
        fullJoin in interface Table<R extends Record>
      • fullJoin

        public final TableOnStep<Record> fullJoin​(String sql)
        Description copied from interface: Table
        FULL OUTER JOIN a table to this table.

        A synonym for Table.fullOuterJoin(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!

        Specified by:
        fullJoin in interface Table<R extends Record>
      • fullJoin

        public final TableOnStep<Record> fullJoin​(String sql,
                                                  Object... bindings)
        Description copied from interface: Table
        FULL OUTER JOIN a table to this table.

        A synonym for Table.fullOuterJoin(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!

        Specified by:
        fullJoin in interface Table<R extends Record>
      • fullJoin

        public final TableOnStep<Record> fullJoin​(String sql,
                                                  QueryPart... parts)
        Description copied from interface: Table
        FULL OUTER JOIN a table to this table.

        A synonym for Table.fullOuterJoin(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!

        Specified by:
        fullJoin in interface Table<R extends Record>
      • crossJoin

        public final Table<Record> crossJoin​(TableLike<?> table)
        Description copied from interface: 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
         
        Specified by:
        crossJoin in interface Table<R extends Record>
      • crossJoin

        public final Table<Record> crossJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        crossJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • crossJoin

        public final Table<Record> crossJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        crossJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • crossJoin

        public final Table<Record> crossJoin​(String sql,
                                             Object... bindings)
        Description copied from interface: 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!

        Specified by:
        crossJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • crossJoin

        public final Table<Record> crossJoin​(String sql,
                                             QueryPart... parts)
        Description copied from interface: 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!

        Specified by:
        crossJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • crossJoin

        public final Table<Record> crossJoin​(Name name)
        Description copied from interface: 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
         
        Specified by:
        crossJoin in interface Table<R extends Record>
        See Also:
        DSL.table(Name)
      • naturalJoin

        public final Table<Record> naturalJoin​(TableLike<?> table)
        Description copied from interface: 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.

        Specified by:
        naturalJoin in interface Table<R extends Record>
      • naturalJoin

        public final Table<Record> naturalJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        naturalJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • naturalJoin

        public final Table<Record> naturalJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        naturalJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • naturalJoin

        public final Table<Record> naturalJoin​(String sql,
                                               Object... bindings)
        Description copied from interface: 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!

        Specified by:
        naturalJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • naturalJoin

        public final Table<Record> naturalJoin​(String sql,
                                               QueryPart... parts)
        Description copied from interface: 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!

        Specified by:
        naturalJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • naturalJoin

        public final Table<Record> naturalJoin​(Name name)
        Description copied from interface: 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.

        Specified by:
        naturalJoin in interface Table<R extends Record>
        See Also:
        DSL.table(Name)
      • naturalLeftOuterJoin

        public final Table<Record> naturalLeftOuterJoin​(TableLike<?> table)
        Description copied from interface: 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.

        Specified by:
        naturalLeftOuterJoin in interface Table<R extends Record>
      • naturalLeftOuterJoin

        public final Table<Record> naturalLeftOuterJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        naturalLeftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • naturalLeftOuterJoin

        public final Table<Record> naturalLeftOuterJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        naturalLeftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • naturalLeftOuterJoin

        public final Table<Record> naturalLeftOuterJoin​(String sql,
                                                        Object... bindings)
        Description copied from interface: 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!

        Specified by:
        naturalLeftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • naturalLeftOuterJoin

        public final Table<Record> naturalLeftOuterJoin​(String sql,
                                                        QueryPart... parts)
        Description copied from interface: 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!

        Specified by:
        naturalLeftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • naturalLeftOuterJoin

        public final Table<Record> naturalLeftOuterJoin​(Name name)
        Description copied from interface: 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.

        Specified by:
        naturalLeftOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(Name)
      • naturalRightOuterJoin

        public final Table<Record> naturalRightOuterJoin​(TableLike<?> table)
        Description copied from interface: 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.

        Specified by:
        naturalRightOuterJoin in interface Table<R extends Record>
      • naturalRightOuterJoin

        public final Table<Record> naturalRightOuterJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        naturalRightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • naturalRightOuterJoin

        public final Table<Record> naturalRightOuterJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        naturalRightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • naturalRightOuterJoin

        public final Table<Record> naturalRightOuterJoin​(String sql,
                                                         Object... bindings)
        Description copied from interface: 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!

        Specified by:
        naturalRightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • naturalRightOuterJoin

        public final Table<Record> naturalRightOuterJoin​(String sql,
                                                         QueryPart... parts)
        Description copied from interface: 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!

        Specified by:
        naturalRightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • naturalRightOuterJoin

        public final Table<Record> naturalRightOuterJoin​(Name name)
        Description copied from interface: 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.

        Specified by:
        naturalRightOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(Name)
      • naturalFullOuterJoin

        public final Table<Record> naturalFullOuterJoin​(TableLike<?> table)
        Description copied from interface: Table
        NATURAL FULL 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.

        Specified by:
        naturalFullOuterJoin in interface Table<R extends Record>
      • naturalFullOuterJoin

        public final Table<Record> naturalFullOuterJoin​(SQL sql)
        Description copied from interface: Table
        NATURAL FULL 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!

        Specified by:
        naturalFullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • naturalFullOuterJoin

        public final Table<Record> naturalFullOuterJoin​(String sql)
        Description copied from interface: Table
        NATURAL FULL 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!

        Specified by:
        naturalFullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • naturalFullOuterJoin

        public final Table<Record> naturalFullOuterJoin​(String sql,
                                                        Object... bindings)
        Description copied from interface: Table
        NATURAL FULL 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!

        Specified by:
        naturalFullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • naturalFullOuterJoin

        public final Table<Record> naturalFullOuterJoin​(String sql,
                                                        QueryPart... parts)
        Description copied from interface: Table
        NATURAL FULL 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!

        Specified by:
        naturalFullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String, QueryPart...), DSL.sql(String, QueryPart...), SQL
      • naturalFullOuterJoin

        public final Table<Record> naturalFullOuterJoin​(Name name)
        Description copied from interface: Table
        NATURAL FULL 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.

        Specified by:
        naturalFullOuterJoin in interface Table<R extends Record>
        See Also:
        DSL.table(Name)
      • crossApply

        public final Table<Record> crossApply​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        crossApply in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • crossApply

        public final Table<Record> crossApply​(String sql)
        Description copied from interface: 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!

        Specified by:
        crossApply in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • crossApply

        public final Table<Record> crossApply​(String sql,
                                              Object... bindings)
        Description copied from interface: 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!

        Specified by:
        crossApply in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • outerApply

        public final Table<Record> outerApply​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        outerApply in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • outerApply

        public final Table<Record> outerApply​(String sql)
        Description copied from interface: 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!

        Specified by:
        outerApply in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • outerApply

        public final Table<Record> outerApply​(String sql,
                                              Object... bindings)
        Description copied from interface: 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!

        Specified by:
        outerApply in interface Table<R extends Record>
        See Also:
        DSL.table(String, Object...), DSL.sql(String, Object...), SQL
      • straightJoin

        public final TableOptionalOnStep<Record> straightJoin​(SQL sql)
        Description copied from interface: 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!

        Specified by:
        straightJoin in interface Table<R extends Record>
        See Also:
        DSL.table(SQL), SQL
      • straightJoin

        public final TableOptionalOnStep<Record> straightJoin​(String sql)
        Description copied from interface: 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!

        Specified by:
        straightJoin in interface Table<R extends Record>
        See Also:
        DSL.table(String), SQL
      • getName

        public final String getName()
        Description copied from interface: Named
        The unqualified name of this object.
        Specified by:
        getName in interface Named
      • getQualifiedName

        public Name getQualifiedName()
        Description copied from interface: Named
        The qualified name of this object.
        Specified by:
        getQualifiedName in interface Named
      • getUnqualifiedName

        public final Name getUnqualifiedName()
        Description copied from interface: Named
        The unqualified name of this object.
        Specified by:
        getUnqualifiedName in interface Named
      • getComment

        public final String getComment()
        Description copied from interface: Named
        The comment on this object.
        Specified by:
        getComment in interface Named
      • hashCode

        public int hashCode()
        Description copied from interface: QueryPart
        Generate a hash code from this QueryPart.

        In general, QueryPart hash codes are the same as the hash codes generated from QueryPart.toString(). This guarantees consistent behaviour with QueryPart.equals(Object)

        Some QueryPart implementations may choose to override this behaviour for improved performance, as QueryPart.toString() is an expensive operation, if called many times.

        Specified by:
        hashCode in interface QueryPart
        Returns:
        The QueryPart hash code
      • toSQL

        @Deprecated
        public final void toSQL​(RenderContext context)
        Deprecated.
        - 3.4.0 - [#2694] - Use QueryPartInternal.accept(Context) instead.
        Description copied from interface: QueryPartInternal
        Render this QueryPart to a SQL string contained in context.sql(). The context will contain additional information about how to render this QueryPart, e.g. whether this QueryPart should be rendered as a declaration or reference, whether this QueryPart's contained bind variables should be inlined or replaced by '?', etc.
        Specified by:
        toSQL in interface QueryPartInternal
      • toString

        public String toString()
        Description copied from interface: QueryPart
        Render a SQL string representation of this QueryPart.

        For improved debugging, this renders a SQL string of this QueryPart with inlined bind variables. If this QueryPart is Attachable, then the attached Configuration may be used for rendering the SQL string, including SQLDialect and Settings. Do note that most QueryPart instances are not attached to a Configuration, and thus there is no guarantee that the SQL string will make sense in the context of a specific database.

        Specified by:
        toString in interface QueryPart
        Overrides:
        toString in class Object
        Returns:
        A SQL string representation of this QueryPart