-
- Type Parameters:
R- The record type associated with this table
- All Superinterfaces:
Named,Qualified,QueryPart,Serializable,TableLike<R>
- All Known Subinterfaces:
CommonTableExpression<R>,JSONTableColumnPathStep,JSONTableColumnsStep,TableOnConditionStep<R>,TableOptionalOnStep<R>,XMLTableColumnPathStep,XMLTableColumnsStep
- All Known Implementing Classes:
CustomTable,TableImpl
public interface Table<R extends Record> extends TableLike<R>, Qualified
A table.Like
Field, aTableis a basic building block of anyQuery, as they all operate on at least one table. There are many different types of tables, including:- Generated table references
- Plain SQL tables created with
DSL.table(String) - Table references created with
DSL.table(Name) - Derived tables created with
DSL.table(Select) - Join expressions created e.g. with
join(TableLike) - Common table expressions (
CommonTableExpression) - Unnested arrays referenced through
DSL.unnest(Field)and overloads - Table valued functions as provided by the code generator
- Etc.
Example:
// Assuming import static org.jooq.impl.DSL.*; using(configuration) .select(ACTOR.FIRST_NAME, ACTOR.LAST_NAME) .from(ACTOR) // Table reference .fetch();Instances can be created using
DSL.table(Name)and overloads.- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @NotNull Table<R>as(String alias)Create an alias for this table.@NotNull Table<R>as(String alias, String... fieldAliases)Create an alias for this table and its fields.@NotNull Table<R>as(String alias, BiFunction<? super Field<?>,? super Integer,? extends String> aliasFunction)Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ.@NotNull Table<R>as(String alias, Function<? super Field<?>,? extends String> aliasFunction)Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ.@NotNull Table<R>as(Name alias)Create an alias for this table.@NotNull Table<R>as(Name alias, BiFunction<? super Field<?>,? super Integer,? extends Name> aliasFunction)Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ.@NotNull Table<R>as(Name alias, Function<? super Field<?>,? extends Name> aliasFunction)Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ.@NotNull Table<R>as(Name alias, Name... fieldAliases)Create an alias for this table and its fields.@NotNull Table<R>as(Table<?> otherTable)Create an alias for this table based on another table's name.@NotNull Table<R>as(Table<?> otherTable, BiFunction<? super Field<?>,? super Integer,? extends Field<?>> aliasFunction)Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ.@NotNull Table<R>as(Table<?> otherTable, Function<? super Field<?>,? extends Field<?>> aliasFunction)Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ.@NotNull Table<R>as(Table<?> otherTable, Field<?>... otherFields)Create an alias for this table based on another table's name.@NotNull Table<R>asOfScn(Number scn)Create anSQLDialect.ORACLEflashback query clause from this table.@NotNull Table<R>asOfScn(Field<? extends Number> scn)Create anSQLDialect.ORACLEflashback query clause from this table.@NotNull Table<R>asOfTimestamp(Timestamp timestamp)Create anSQLDialect.ORACLEflashback query clause from this table.@NotNull Table<R>asOfTimestamp(Field<Timestamp> timestamp)Create anSQLDialect.ORACLEflashback query clause from this table.@NotNull QualifiedAsteriskasterisk()Create a qualified asterisk expression from this table (table.*) for use withSELECT.@NotNull Table<R>at(String link)A table reference of this table at a givenLink.@NotNull Table<R>at(Link link)A table reference of this table at a givenLink.@NotNull Table<R>at(Name link)A table reference of this table at a givenLink.@NotNull Table<Record>crossApply(String sql)CROSS APPLYa table to this table.@NotNull Table<Record>crossApply(String sql, Object... bindings)CROSS APPLYa table to this table.@NotNull Table<Record>crossApply(String sql, QueryPart... parts)CROSS APPLYa table to this table.@NotNull Table<Record>crossApply(Name name)CROSS APPLYa table to this table.@NotNull Table<Record>crossApply(SQL sql)CROSS APPLYa table to this table.@NotNull Table<Record>crossApply(TableLike<?> table)CROSS APPLYa table to this table.@NotNull Table<Record>crossJoin(String sql)CROSS JOINa table to this table.@NotNull Table<Record>crossJoin(String sql, Object... bindings)CROSS JOINa table to this table.@NotNull Table<Record>crossJoin(String sql, QueryPart... parts)CROSS JOINa table to this table.@NotNull Table<Record>crossJoin(Name name)CROSS JOINa table to this table.@NotNull Table<Record>crossJoin(SQL sql)CROSS JOINa table to this table.@NotNull Table<Record>crossJoin(TableLike<?> table)CROSS JOINa table to this table.@NotNull DivideByOnStepdivideBy(Table<?> divisor)Create a newTABLEreference from this table, applying relational division.@NotNull Conditioneq(Table<R> table)Create a predicate comparing records from self-joined tables.@NotNull Conditionequal(Table<R> table)Create a predicate comparing records from self-joined tables.booleanequals(Object other)Check whether thisQueryPartcan be considered equal to anotherQueryPart.@NotNull Table<R>for_(PeriodSpecification periodSpecification)Create a reference to a temporal table with aPeriodSpecificationfor usage inSelect.@NotNull Table<R>forceIndex(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>forceIndexForGroupBy(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>forceIndexForJoin(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>forceIndexForOrderBy(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>forPortionOf(PeriodSpecification periodSpecification)Rfrom(Record record)The inverse operation ofRecord.into(Table).@NotNull TableOnStep<Record>fullJoin(String sql)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullJoin(String sql, Object... bindings)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullJoin(String sql, QueryPart... parts)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullJoin(Name name)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullJoin(SQL sql)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullJoin(TableLike<?> table)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullOuterJoin(String sql)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullOuterJoin(String sql, Object... bindings)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullOuterJoin(String sql, QueryPart... parts)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullOuterJoin(Name name)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullOuterJoin(SQL sql)FULL OUTER JOINa table to this table.@NotNull TableOnStep<Record>fullOuterJoin(TableLike<?> table)FULL OUTER JOINa table to this table.@NotNull List<Check<R>>getChecks()Get a list ofCHECKconstraints of this table.@NotNull DataType<R>getDataType()The table's record type as a UDT data type, in case the underlying database supports table records as UDT records.@Nullable Identity<R,?>getIdentity()Retrieve the table'sIDENTITYinformation, if available.@NotNull List<Index>getIndexes()Retrieve all of the table's indexes.@NotNull List<UniqueKey<R>>getKeys()Retrieve all of the table's unique keys.@NotNull TableOptionsgetOptions()Get the table options.@Nullable UniqueKey<R>getPrimaryKey()Retrieve the table's primary key@Nullable TableField<R,?>getRecordTimestamp()A "timestamp" field holding record timestamp information used for optimistic locking@NotNull Class<? extends R>getRecordType()The record type produced by this table.@Nullable TableField<R,?>getRecordVersion()A "version" field holding record version information used for optimistic locking@NotNull List<ForeignKey<R,?>>getReferences()Get the list ofFOREIGN KEY's of this table<O extends Record>
@NotNull List<ForeignKey<O,R>>getReferencesFrom(Table<O> other)Get a list ofFOREIGN KEY's of a specific table, referencing a this table.<O extends Record>
@NotNull List<ForeignKey<R,O>>getReferencesTo(Table<O> other)Get a list ofFOREIGN KEY's of this table, referencing a specific table.@NotNull TableOptions.TableTypegetType()Get the table type.@NotNull Table<R>ignoreIndex(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>ignoreIndexForGroupBy(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>ignoreIndexForJoin(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>ignoreIndexForOrderBy(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull TableOnStep<Record>innerJoin(String sql)INNER JOINa table to this table.@NotNull TableOnStep<Record>innerJoin(String sql, Object... bindings)INNER JOINa table to this table.@NotNull TableOnStep<Record>innerJoin(String sql, QueryPart... parts)INNER JOINa table to this table.@NotNull TableOnStep<Record>innerJoin(Name name)INNER JOINa table to this table.@NotNull TableOnStep<Record>innerJoin(SQL sql)INNER JOINa table to this table.@NotNull TableOnStep<Record>innerJoin(TableLike<?> table)INNER JOINa table to this table.@NotNull TableOnStep<Record>join(String sql)INNER JOINa table to this table.@NotNull TableOnStep<Record>join(String sql, Object... bindings)INNER JOINa table to this table.@NotNull TableOnStep<Record>join(String sql, QueryPart... parts)INNER JOINa table to this table.@NotNull TableOnStep<Record>join(Name name)INNER JOINa table to this table.@NotNull TableOnStep<Record>join(SQL sql)INNER JOINa table to this table.@NotNull TableOnStep<Record>join(TableLike<?> table)INNER JOINa table to this table.@NotNull TableOptionalOnStep<Record>join(TableLike<?> table, JoinType type)Join a table to this table using aJoinType@NotNull TableOnStep<R>leftAntiJoin(TableLike<?> table)A syntheticLEFT ANTI JOINclause that translates to an equivalentNOT EXISTSpredicate.@NotNull TablePartitionByStep<Record>leftJoin(String sql)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftJoin(String sql, Object... bindings)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftJoin(String sql, QueryPart... parts)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftJoin(Name name)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftJoin(SQL sql)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftJoin(TableLike<?> table)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftOuterJoin(String sql)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftOuterJoin(String sql, Object... bindings)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftOuterJoin(String sql, QueryPart... parts)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftOuterJoin(Name name)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftOuterJoin(SQL sql)LEFT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>leftOuterJoin(TableLike<?> table)LEFT OUTER JOINa table to this table.@NotNull TableOnStep<R>leftSemiJoin(TableLike<?> table)A syntheticLEFT SEMI JOINclause that translates to an equivalentEXISTSpredicate.@NotNull Table<Record>naturalFullOuterJoin(String sql)NATURAL FULL OUTER JOINa table to this table.@NotNull Table<Record>naturalFullOuterJoin(String sql, Object... bindings)NATURAL FULL OUTER JOINa table to this table.@NotNull Table<Record>naturalFullOuterJoin(String sql, QueryPart... parts)NATURAL FULL OUTER JOINa table to this table.@NotNull Table<Record>naturalFullOuterJoin(Name name)NATURAL FULL OUTER JOINa table to this table.@NotNull Table<Record>naturalFullOuterJoin(SQL sql)NATURAL FULL OUTER JOINa table to this table.@NotNull Table<Record>naturalFullOuterJoin(TableLike<?> table)NATURAL FULL OUTER JOINa table to this table.@NotNull Table<Record>naturalJoin(String sql)NATURAL JOINa table to this table.@NotNull Table<Record>naturalJoin(String sql, Object... bindings)NATURAL JOINa table to this table.@NotNull Table<Record>naturalJoin(String sql, QueryPart... parts)NATURAL JOINa table to this table.@NotNull Table<Record>naturalJoin(Name name)NATURAL JOINa table to this table.@NotNull Table<Record>naturalJoin(SQL sql)NATURAL JOINa table to this table.@NotNull Table<Record>naturalJoin(TableLike<?> table)NATURAL JOINa table to this table.@NotNull Table<Record>naturalLeftOuterJoin(String sql)NATURAL LEFT OUTER JOINa table to this table.@NotNull Table<Record>naturalLeftOuterJoin(String sql, Object... bindings)NATURAL LEFT OUTER JOINa table to this table.@NotNull Table<Record>naturalLeftOuterJoin(String sql, QueryPart... parts)NATURAL LEFT OUTER JOINa table to this table.@NotNull Table<Record>naturalLeftOuterJoin(Name name)NATURAL LEFT OUTER JOINa table to this table.@NotNull Table<Record>naturalLeftOuterJoin(SQL sql)NATURAL LEFT OUTER JOINa table to this table.@NotNull Table<Record>naturalLeftOuterJoin(TableLike<?> table)NATURAL LEFT OUTER JOINa table to this table.@NotNull Table<Record>naturalRightOuterJoin(String sql)NATURAL RIGHT OUTER JOINa table to this table.@NotNull Table<Record>naturalRightOuterJoin(String sql, Object... bindings)NATURAL RIGHT OUTER JOINa table to this table.@NotNull Table<Record>naturalRightOuterJoin(String sql, QueryPart... parts)NATURAL RIGHT OUTER JOINa table to this table.@NotNull Table<Record>naturalRightOuterJoin(Name name)NATURAL RIGHT OUTER JOINa table to this table.@NotNull Table<Record>naturalRightOuterJoin(SQL sql)NATURAL RIGHT OUTER JOINa table to this table.@NotNull Table<Record>naturalRightOuterJoin(TableLike<?> table)NATURAL RIGHT OUTER JOINa table to this table.@NotNull Conditionne(Table<R> table)Create a predicate comparing records from self-non-equi-joined tables.RnewRecord()Create a newRecordof this table's type.@NotNull ConditionnotEqual(Table<R> table)Create a predicate comparing records from self-non-equi-joined tables.@NotNull Table<Record>outerApply(String sql)OUTER APPLYa table to this table.@NotNull Table<Record>outerApply(String sql, Object... bindings)OUTER APPLYa table to this table.@NotNull Table<Record>outerApply(String sql, QueryPart... parts)OUTER APPLYa table to this table.@NotNull Table<Record>outerApply(Name name)OUTER APPLYa table to this table.@NotNull Table<Record>outerApply(SQL sql)OUTER APPLYa table to this table.@NotNull Table<Record>outerApply(TableLike<?> table)OUTER APPLYa table to this table.@NotNull TableOuterJoinStep<Record>partitionBy(Collection<? extends Field<?>> fields)Add aPARTITION BYclause to the left hand side of theOUTER JOINkeywords@NotNull TableOuterJoinStep<Record>partitionBy(Field<?>... fields)Add aPARTITION BYclause to the left hand side of theOUTER JOINkeywords@NotNull PivotForSteppivot(Collection<? extends Field<?>> aggregateFunctions)Create a newTABLEreference from this table, pivoting it into another form.@NotNull PivotForSteppivot(Field<?>... aggregateFunctions)Create a newTABLEreference from this table, pivoting it into another form.@NotNull RecordType<R>recordType()The record type produced by this table.@NotNull TablePartitionByStep<Record>rightJoin(String sql)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightJoin(String sql, Object... bindings)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightJoin(String sql, QueryPart... parts)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightJoin(Name name)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightJoin(SQL sql)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightJoin(TableLike<?> table)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightOuterJoin(String sql)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightOuterJoin(String sql, Object... bindings)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightOuterJoin(String sql, QueryPart... parts)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightOuterJoin(Name name)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightOuterJoin(SQL sql)RIGHT OUTER JOINa table to this table.@NotNull TablePartitionByStep<Record>rightOuterJoin(TableLike<?> table)RIGHT OUTER JOINa table to this table.@NotNull Field<RowId>rowid()Get atable.rowidreference from this table.@NotNull TableOnStep<Record>straightJoin(String sql)STRAIGHT_JOINa table to this table.@NotNull TableOnStep<Record>straightJoin(String sql, Object... bindings)STRAIGHT_JOINa table to this table.@NotNull TableOnStep<Record>straightJoin(String sql, QueryPart... parts)STRAIGHT_JOINa table to this table.@NotNull TableOnStep<Record>straightJoin(Name name)STRAIGHT_JOINa table to this table.@NotNull TableOnStep<Record>straightJoin(SQL sql)STRAIGHT_JOINa table to this table.@NotNull TableOnStep<Record>straightJoin(TableLike<?> table)STRAIGHT_JOINa table to this table.@NotNull Table<R>useIndex(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>useIndexForGroupBy(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>useIndexForJoin(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull Table<R>useIndexForOrderBy(String... indexes)Specify a MySQL style table hint for query optimisation.@NotNull VersionsBetweenAndStep<R,Number>versionsBetweenScn(Number scn)Create anSQLDialect.ORACLEflashback versions query clause from this table.@NotNull VersionsBetweenAndStep<R,Number>versionsBetweenScn(Field<? extends Number> scn)Create anSQLDialect.ORACLEflashback versions query clause from this table.@NotNull VersionsBetweenAndStep<R,Number>versionsBetweenScnMinvalue()Create anSQLDialect.ORACLEflashback versions query clause from this table.@NotNull VersionsBetweenAndStep<R,Timestamp>versionsBetweenTimestamp(Timestamp timestamp)Create anSQLDialect.ORACLEflashback versions query clause from this table.@NotNull VersionsBetweenAndStep<R,Timestamp>versionsBetweenTimestamp(Field<Timestamp> timestamp)Create anSQLDialect.ORACLEflashback versions query clause from this table.@NotNull VersionsBetweenAndStep<R,Timestamp>versionsBetweenTimestampMinvalue()Create anSQLDialect.ORACLEflashback versions query clause from this table.@NotNull Table<R>where(String sql)Add aWHEREclause to the table.@NotNull Table<R>where(String sql, Object... bindings)Add aWHEREclause to the table.@NotNull Table<R>where(String sql, QueryPart... parts)Add aWHEREclause to the table.@NotNull Table<R>where(Collection<? extends Condition> conditions)Add aWHEREclause to the table, connecting them with each other withOperator.AND.@NotNull Table<R>where(Condition condition)Add aWHEREclause to the table, connecting them with each other withOperator.AND.@NotNull Table<R>where(Condition... conditions)Add aWHEREclause to the table, connecting them with each other withOperator.AND.@NotNull Table<R>where(Field<Boolean> field)Add aWHEREclause to the table.@NotNull Table<R>where(SQL sql)Add aWHEREclause to the table.@NotNull Table<R>whereExists(Select<?> select)Add aWHERE EXISTSclause to the table.@NotNull Table<R>whereNotExists(Select<?> select)Add aWHERE NOT EXISTSclause to the table.@NotNull Table<R>with(String hint)Specify a SQL Server style table hint for query optimisation.@NotNull Table<R>with(String hint, Object... binds)Specify a SQL Server style table hint for query optimisation.@NotNull Table<R>with(String hint, QueryPart... parts)Specify a SQL Server style table hint for query optimisation.@NotNull Table<R>with(SQL hint)Specify a SQL Server style table hint for query optimisation.-
Methods inherited from interface org.jooq.Named
getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
Methods inherited from interface org.jooq.Qualified
getCatalog, getSchema
-
-
-
-
Method Detail
-
getType
@NotNull @NotNull TableOptions.TableType getType()
Get the table type.
-
getOptions
@NotNull @NotNull TableOptions getOptions()
Get the table options.
-
recordType
@NotNull @NotNull RecordType<R> recordType()
The record type produced by this table.
-
getRecordType
@NotNull @NotNull Class<? extends R> getRecordType()
The record type produced by this table.
-
getDataType
@NotNull @NotNull DataType<R> getDataType()
The table's record type as a UDT data type, in case the underlying database supports table records as UDT records.
-
newRecord
@NotNull R newRecord()
Create a newRecordof this table's type.- See Also:
DSLContext.newRecord(Table)
-
getIdentity
@Nullable @Nullable Identity<R,?> getIdentity()
Retrieve the table'sIDENTITYinformation, if available.With SQL:2003, the concept of
IDENTITYcolumns was introduced in most RDBMS. These are special kinds of columns that have auto-increment functionality whenINSERTstatements are performed.An
IDENTITYcolumn is usually part of thePRIMARY KEYor of aUNIQUE KEYin the table, although in some RDBMS, this is not required. There can only be at most oneIDENTITYcolumn.Note: Unfortunately, this is not supported in the Oracle dialect, where identities emulated by triggers cannot be formally detected.
- Returns:
- The table's
IDENTITYinformation, ornull, if no such information is available.
-
getPrimaryKey
@Nullable @Nullable UniqueKey<R> getPrimaryKey()
Retrieve the table's primary key- Returns:
- The primary key. This is never
nullfor an updatable table.
-
getRecordVersion
@Nullable @Nullable TableField<R,?> getRecordVersion()
A "version" field holding record version information used for optimistic lockingjOOQ supports optimistic locking in
UpdatableRecord.store()andUpdatableRecord.delete()ifSettings.isExecuteWithOptimisticLocking()is enabled. Optimistic locking is performed in a singleUPDATEorDELETEstatement if tables provide a "version" or "timestamp" field, or in two steps using an additionalSELECT .. FOR UPDATEstatement 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.
- Returns:
- The "version" field, or
null, if this table has no "version" field. - See Also:
getRecordTimestamp(),UpdatableRecord.store(),UpdatableRecord.delete(),Settings.isExecuteWithOptimisticLocking()
-
getRecordTimestamp
@Nullable @Nullable TableField<R,?> getRecordTimestamp()
A "timestamp" field holding record timestamp information used for optimistic lockingjOOQ supports optimistic locking in
UpdatableRecord.store()andUpdatableRecord.delete()ifSettings.isExecuteWithOptimisticLocking()is enabled. Optimistic locking is performed in a singleUPDATEorDELETEstatement if tables provide a "version" or "timestamp" field, or in two steps using an additionalSELECT .. FOR UPDATEstatement 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.
- Returns:
- The "timestamp" field, or
null, if this table has no "timestamp" field. - See Also:
getRecordVersion(),UpdatableRecord.store(),UpdatableRecord.delete(),Settings.isExecuteWithOptimisticLocking()
-
getIndexes
@NotNull @NotNull List<Index> getIndexes()
Retrieve all of the table's indexes.- Returns:
- All indexes. This is never
null. This method returns an unmodifiable list.
-
getKeys
@NotNull @NotNull List<UniqueKey<R>> getKeys()
Retrieve all of the table's unique keys.- Returns:
- All keys. This is never
null. This is never empty for aTablewith agetPrimaryKey(). This method returns an unmodifiable list.
-
getReferencesFrom
@NotNull <O extends Record> @NotNull List<ForeignKey<O,R>> getReferencesFrom(Table<O> other)
Get a list ofFOREIGN KEY's of a specific table, referencing a this table.This will recurse into joined tables.
- 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 nevernull. This method returns an unmodifiable list.
-
getReferences
@NotNull @NotNull List<ForeignKey<R,?>> getReferences()
Get the list ofFOREIGN KEY's of this table- Returns:
- This table's
FOREIGN KEY's. This is nevernull.
-
getReferencesTo
@NotNull <O extends Record> @NotNull List<ForeignKey<R,O>> getReferencesTo(Table<O> other)
Get a list ofFOREIGN KEY's of this table, referencing a specific table.This will recurse into joined tables.
- 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 nevernull.
-
getChecks
@NotNull @NotNull List<Check<R>> getChecks()
Get a list ofCHECKconstraints of this table.
-
at
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> at(String link)
A table reference of this table at a givenLink.- See Also:
DSL.link(String)
-
at
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> at(Name link)
A table reference of this table at a givenLink.- See Also:
DSL.link(Name)
-
at
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> at(Link link)
A table reference of this table at a givenLink.
-
asterisk
@NotNull @Support @NotNull QualifiedAsterisk asterisk()
Create a qualified asterisk expression from this table (table.*) for use withSELECT.- See Also:
DSL.asterisk()
-
rowid
@NotNull @Support({DB2,H2,INFORMIX,ORACLE,POSTGRES,SQLITE,SQLSERVER}) @NotNull Field<RowId> rowid()
Get atable.rowidreference 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
rowidvalues 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.
-
as
@NotNull @Support @NotNull Table<R> as(String alias)
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!- Parameters:
alias- The alias name- Returns:
- The table alias
-
as
@NotNull @Support @NotNull Table<R> as(String alias, String... fieldAliases)
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
- Parameters:
alias- The alias namefieldAliases- The field aliases. Excess aliases are ignored, missing aliases will be substituted by this table's field names.- Returns:
- The table alias
-
as
@Deprecated @NotNull @Support @NotNull Table<R> as(String alias, Function<? super Field<?>,? extends String> aliasFunction)
Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ. They offer convenience that is unidiomatic for jOOQ's DSL, without offering functionality that would not be possible otherwise - yet they add complexity in jOOQ's internals.Create an alias for this table and its fields.This works like
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());- Parameters:
alias- The alias namealiasFunction- The function providing field aliases.- Returns:
- The table alias
-
as
@Deprecated @NotNull @Support @NotNull Table<R> as(String alias, BiFunction<? super Field<?>,? super Integer,? extends String> aliasFunction)
Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ. They offer convenience that is unidiomatic for jOOQ's DSL, without offering functionality that would not be possible otherwise - yet they add complexity in jOOQ's internals.Create an alias for this table and its fields.This works like
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);- Parameters:
alias- The alias namealiasFunction- The function providing field aliases.- Returns:
- The table alias
-
as
@NotNull @Support @NotNull Table<R> as(Name alias)
Create an alias for this table.Note that the case-sensitivity of the returned table depends on
Settings.getRenderQuotedNames()and theName. By default, table aliases are quoted, and thus case-sensitive in many SQL dialects - useDSL.unquotedName(String...)for case-insensitive aliases.If the argument
Name.getName()is qualified, then theName.last()part will be used.- Parameters:
alias- The alias name- Returns:
- The table alias
-
as
@NotNull @Support @NotNull Table<R> as(Name alias, Name... fieldAliases)
Create an alias for this table and its fields.Note that the case-sensitivity of the returned table depends on
Settings.getRenderQuotedNames()and theName. By default, table aliases are quoted, and thus case-sensitive in many SQL dialects - useDSL.unquotedName(String...)for case-insensitive aliases.If the argument
Name.getName()is qualified, then theName.last()part will be used.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
- Parameters:
alias- The alias namefieldAliases- The field aliases. Excess aliases are ignored, missing aliases will be substituted by this table's field names.- Returns:
- The table alias
-
as
@Deprecated @NotNull @Support @NotNull Table<R> as(Name alias, Function<? super Field<?>,? extends Name> aliasFunction)
Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ. They offer convenience that is unidiomatic for jOOQ's DSL, without offering functionality that would not be possible otherwise - yet they add complexity in jOOQ's internals.Create an alias for this table and its fields.This works like
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());- Parameters:
alias- The alias namealiasFunction- The function providing field aliases.- Returns:
- The table alias
-
as
@Deprecated @NotNull @Support @NotNull Table<R> as(Name alias, BiFunction<? super Field<?>,? super Integer,? extends Name> aliasFunction)
Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ. They offer convenience that is unidiomatic for jOOQ's DSL, without offering functionality that would not be possible otherwise - yet they add complexity in jOOQ's internals.Create an alias for this table and its fields.This works like
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);- Parameters:
alias- The alias namealiasFunction- The function providing field aliases.- Returns:
- The table alias
-
as
@NotNull @Support @NotNull Table<R> as(Table<?> otherTable)
Create an alias for this table based on another table's name.- Parameters:
otherTable- The other table whose name this table is aliased with.- Returns:
- The table alias.
-
as
@NotNull @Support @NotNull Table<R> as(Table<?> otherTable, Field<?>... otherFields)
Create an alias for this table based on another table's name.- 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
@Deprecated @NotNull @Support @NotNull Table<R> as(Table<?> otherTable, Function<? super Field<?>,? extends Field<?>> aliasFunction)
Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ. They offer convenience that is unidiomatic for jOOQ's DSL, without offering functionality that would not be possible otherwise - yet they add complexity in jOOQ's internals.Create an alias for this table and its fields.This works like
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));
- Parameters:
otherTable- The other table whose name is used as alias namealiasFunction- The function providing field aliases.- Returns:
- The table alias
-
as
@Deprecated @NotNull @Support @NotNull Table<R> as(Table<?> otherTable, BiFunction<? super Field<?>,? super Integer,? extends Field<?>> aliasFunction)
Deprecated.- 3.14.0 - [#10156] - These methods will be removed without replacement from a future jOOQ. They offer convenience that is unidiomatic for jOOQ's DSL, without offering functionality that would not be possible otherwise - yet they add complexity in jOOQ's internals.Create an alias for this table and its fields.This works like
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);- Parameters:
otherTable- The other table whose name is used as alias namealiasFunction- The function providing field aliases.- Returns:
- The table alias
-
where
@NotNull @Support @NotNull Table<R> where(Condition condition)
Add aWHEREclause to the table, connecting them with each other withOperator.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.
-
where
@NotNull @Support @NotNull Table<R> where(Condition... conditions)
Add aWHEREclause to the table, connecting them with each other withOperator.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.
-
where
@NotNull @Support @NotNull Table<R> where(Collection<? extends Condition> conditions)
Add aWHEREclause to the table, connecting them with each other withOperator.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.
-
where
@NotNull @Support @NotNull Table<R> where(Field<Boolean> field)
Add aWHEREclause 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.
-
where
@NotNull @Support @PlainSQL @NotNull Table<R> where(SQL sql)
Add aWHEREclause 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!
- See Also:
DSL.condition(SQL),SQL
-
where
@NotNull @Support @PlainSQL @NotNull Table<R> where(String sql)
Add aWHEREclause 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!
- See Also:
DSL.condition(String),SQL
-
where
@NotNull @Support @PlainSQL @NotNull Table<R> where(String sql, Object... bindings)
Add aWHEREclause 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!
-
where
@NotNull @Support @PlainSQL @NotNull Table<R> where(String sql, QueryPart... parts)
Add aWHEREclause 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!
-
whereExists
@NotNull @Support @NotNull Table<R> whereExists(Select<?> select)
Add aWHERE EXISTSclause 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.
-
whereNotExists
@NotNull @Support @NotNull Table<R> whereNotExists(Select<?> select)
Add aWHERE NOT EXISTSclause 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.
-
join
@NotNull @Support @NotNull TableOptionalOnStep<Record> join(TableLike<?> table, JoinType type)
Join a table to this table using aJoinTypeDepending on the
JoinType, a subsequentTableOnStep.on(Condition)orTableOnStep.using(Field...)clause is required. If it is required but omitted, aDSL.trueCondition(), i.e.1 = 1condition will be rendered
-
join
@NotNull @Support @NotNull TableOnStep<Record> join(TableLike<?> table)
INNER JOINa table to this table.A synonym for
innerJoin(TableLike).- See Also:
innerJoin(TableLike)
-
join
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> join(SQL sql)
INNER JOINa table to this table.A synonym for
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 Also:
DSL.table(SQL),innerJoin(SQL),SQL
-
join
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> join(String sql)
INNER JOINa table to this table.A synonym for
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 Also:
DSL.table(String),innerJoin(String),SQL
-
join
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> join(String sql, Object... bindings)
INNER JOINa table to this table.A synonym for
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!
-
join
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> join(String sql, QueryPart... parts)
INNER JOINa table to this table.A synonym for
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!
-
join
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> join(Name name)
INNER JOINa table to this table.A synonym for
innerJoin(Name).- See Also:
DSL.table(Name),innerJoin(Name)
-
innerJoin
@NotNull @Support @NotNull TableOnStep<Record> innerJoin(TableLike<?> table)
INNER JOINa table to this table.
-
innerJoin
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> innerJoin(SQL sql)
INNER JOINa 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 Also:
DSL.table(SQL),SQL
-
innerJoin
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> innerJoin(String sql)
INNER JOINa 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 Also:
DSL.table(String),SQL
-
innerJoin
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> innerJoin(String sql, Object... bindings)
INNER JOINa 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!
-
innerJoin
@NotNull @Support @PlainSQL @NotNull TableOnStep<Record> innerJoin(String sql, QueryPart... parts)
INNER JOINa 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!
-
innerJoin
@NotNull @Support @NotNull TableOnStep<Record> innerJoin(Name name)
INNER JOINa table to this table.- See Also:
DSL.table(Name)
-
partitionBy
@NotNull @Support(ORACLE) @Pro @NotNull TableOuterJoinStep<Record> partitionBy(Field<?>... fields)
Add aPARTITION BYclause to the left hand side of theOUTER JOINkeywords
-
partitionBy
@NotNull @Support(ORACLE) @Pro @NotNull TableOuterJoinStep<Record> partitionBy(Collection<? extends Field<?>> fields)
Add aPARTITION BYclause to the left hand side of theOUTER JOINkeywords
-
leftJoin
@NotNull @Support @NotNull TablePartitionByStep<Record> leftJoin(TableLike<?> table)
LEFT OUTER JOINa table to this table.A synonym for
leftOuterJoin(TableLike).- See Also:
leftOuterJoin(TableLike)
-
leftJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftJoin(SQL sql)
LEFT OUTER JOINa table to this table.A synonym for
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 Also:
DSL.table(SQL),leftOuterJoin(SQL),SQL
-
leftJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftJoin(String sql)
LEFT OUTER JOINa table to this table.A synonym for
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 Also:
DSL.table(String),leftOuterJoin(String),SQL
-
leftJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftJoin(String sql, Object... bindings)
LEFT OUTER JOINa table to this table.A synonym for
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!
-
leftJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftJoin(String sql, QueryPart... parts)
LEFT OUTER JOINa table to this table.A synonym for
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!
-
leftJoin
@NotNull @Support @NotNull TablePartitionByStep<Record> leftJoin(Name name)
LEFT OUTER JOINa table to this table.A synonym for
leftOuterJoin(Name).- See Also:
DSL.table(Name),leftOuterJoin(Name)
-
leftOuterJoin
@NotNull @Support @NotNull TablePartitionByStep<Record> leftOuterJoin(TableLike<?> table)
LEFT OUTER JOINa table to this table.
-
leftOuterJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftOuterJoin(SQL sql)
LEFT OUTER JOINa 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 Also:
DSL.table(SQL),SQL
-
leftOuterJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftOuterJoin(String sql)
LEFT OUTER JOINa 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 Also:
DSL.table(String),SQL
-
leftOuterJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftOuterJoin(String sql, Object... bindings)
LEFT OUTER JOINa 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!
-
leftOuterJoin
@NotNull @Support @PlainSQL @NotNull TablePartitionByStep<Record> leftOuterJoin(String sql, QueryPart... parts)
LEFT OUTER JOINa 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!
-
leftOuterJoin
@NotNull @Support @NotNull TablePartitionByStep<Record> leftOuterJoin(Name name)
LEFT OUTER JOINa table to this table.- See Also:
DSL.table(Name),SQL
-
rightJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TablePartitionByStep<Record> rightJoin(TableLike<?> table)
RIGHT OUTER JOINa table to this table.A synonym for
rightOuterJoin(TableLike).This is only possible where the underlying RDBMS supports it.
- See Also:
rightOuterJoin(TableLike)
-
rightJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightJoin(SQL sql)
RIGHT OUTER JOINa table to this table.A synonym for
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 Also:
DSL.table(SQL),rightOuterJoin(SQL),SQL
-
rightJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightJoin(String sql)
RIGHT OUTER JOINa table to this table.A synonym for
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 Also:
DSL.table(String),rightOuterJoin(String),SQL
-
rightJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightJoin(String sql, Object... bindings)
RIGHT OUTER JOINa table to this table.A synonym for
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!
-
rightJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightJoin(String sql, QueryPart... parts)
RIGHT OUTER JOINa table to this table.A synonym for
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!
-
rightJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TablePartitionByStep<Record> rightJoin(Name name)
RIGHT OUTER JOINa table to this table.A synonym for
rightOuterJoin(Name).This is only possible where the underlying RDBMS supports it
- See Also:
DSL.table(Name),rightOuterJoin(Name)
-
rightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TablePartitionByStep<Record> rightOuterJoin(TableLike<?> table)
RIGHT OUTER JOINa table to this table.This is only possible where the underlying RDBMS supports it
-
rightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightOuterJoin(SQL sql)
RIGHT OUTER JOINa 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 Also:
DSL.table(SQL),SQL
-
rightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightOuterJoin(String sql)
RIGHT OUTER JOINa 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 Also:
DSL.table(String),SQL
-
rightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightOuterJoin(String sql, Object... bindings)
RIGHT OUTER JOINa 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!
-
rightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TablePartitionByStep<Record> rightOuterJoin(String sql, QueryPart... parts)
RIGHT OUTER JOINa 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!
-
rightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TablePartitionByStep<Record> rightOuterJoin(Name name)
RIGHT OUTER JOINa table to this table.This is only possible where the underlying RDBMS supports it
- See Also:
DSL.table(Name)
-
fullJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TableOnStep<Record> fullJoin(TableLike<?> table)
FULL OUTER JOINa table to this table.A synonym for
fullOuterJoin(TableLike).
-
fullJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullJoin(SQL sql)
FULL OUTER JOINa table to this table.A synonym for
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!
-
fullJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullJoin(String sql)
FULL OUTER JOINa table to this table.A synonym for
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!
-
fullJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullJoin(String sql, Object... bindings)
FULL OUTER JOINa table to this table.A synonym for
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!
-
fullJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullJoin(String sql, QueryPart... parts)
FULL OUTER JOINa table to this table.A synonym for
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!
-
fullJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TableOnStep<Record> fullJoin(Name name)
FULL OUTER JOINa table to this table.A synonym for
fullOuterJoin(Name).
-
fullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TableOnStep<Record> fullOuterJoin(TableLike<?> table)
FULL OUTER JOINa table to this table.This is only possible where the underlying RDBMS supports it
-
fullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullOuterJoin(SQL sql)
FULL OUTER JOINa 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 Also:
DSL.table(SQL),SQL
-
fullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullOuterJoin(String sql)
FULL OUTER JOINa 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 Also:
DSL.table(String),SQL
-
fullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullOuterJoin(String sql, Object... bindings)
FULL OUTER JOINa 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!
-
fullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull TableOnStep<Record> fullOuterJoin(String sql, QueryPart... parts)
FULL OUTER JOINa 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!
-
fullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull TableOnStep<Record> fullOuterJoin(Name name)
FULL OUTER JOINa table to this table.This is only possible where the underlying RDBMS supports it
- See Also:
DSL.table(Name)
-
crossJoin
@NotNull @Support @NotNull Table<Record> crossJoin(TableLike<?> table)
CROSS JOINa 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
-
crossJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> crossJoin(SQL sql)
CROSS JOINa 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 Also:
DSL.table(SQL),SQL
-
crossJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> crossJoin(String sql)
CROSS JOINa 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 Also:
DSL.table(String),SQL
-
crossJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> crossJoin(String sql, Object... bindings)
CROSS JOINa 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!
-
crossJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> crossJoin(String sql, QueryPart... parts)
CROSS JOINa 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!
-
crossJoin
@NotNull @Support @NotNull Table<Record> crossJoin(Name name)
CROSS JOINa 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 Also:
DSL.table(Name)
-
naturalJoin
@NotNull @Support @NotNull Table<Record> naturalJoin(TableLike<?> table)
NATURAL JOINa 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.
-
naturalJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalJoin(SQL sql)
NATURAL JOINa 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 Also:
DSL.table(SQL),SQL
-
naturalJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalJoin(String sql)
NATURAL JOINa 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 Also:
DSL.table(String),SQL
-
naturalJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalJoin(String sql, Object... bindings)
NATURAL JOINa 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!
-
naturalJoin
@NotNull @Support @NotNull Table<Record> naturalJoin(Name name)
NATURAL JOINa 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 Also:
DSL.table(Name)
-
naturalJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalJoin(String sql, QueryPart... parts)
NATURAL JOINa 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!
-
naturalLeftOuterJoin
@NotNull @Support @NotNull Table<Record> naturalLeftOuterJoin(TableLike<?> table)
NATURAL LEFT OUTER JOINa 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.
-
naturalLeftOuterJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalLeftOuterJoin(SQL sql)
NATURAL LEFT OUTER JOINa 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 Also:
DSL.table(SQL),SQL
-
naturalLeftOuterJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalLeftOuterJoin(String sql)
NATURAL LEFT OUTER JOINa 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 Also:
DSL.table(String),SQL
-
naturalLeftOuterJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalLeftOuterJoin(String sql, Object... bindings)
NATURAL LEFT OUTER JOINa 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!
-
naturalLeftOuterJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalLeftOuterJoin(String sql, QueryPart... parts)
NATURAL LEFT OUTER JOINa 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!
-
naturalLeftOuterJoin
@NotNull @Support @PlainSQL @NotNull Table<Record> naturalLeftOuterJoin(Name name)
NATURAL LEFT OUTER JOINa 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 Also:
DSL.table(Name)
-
naturalRightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull Table<Record> naturalRightOuterJoin(TableLike<?> table)
NATURAL RIGHT OUTER JOINa 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.
-
naturalRightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalRightOuterJoin(SQL sql)
NATURAL RIGHT OUTER JOINa 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 Also:
DSL.table(SQL),SQL
-
naturalRightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalRightOuterJoin(String sql)
NATURAL RIGHT OUTER JOINa 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 Also:
DSL.table(String),SQL
-
naturalRightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalRightOuterJoin(String sql, Object... bindings)
NATURAL RIGHT OUTER JOINa 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!
-
naturalRightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalRightOuterJoin(String sql, QueryPart... parts)
NATURAL RIGHT OUTER JOINa 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!
-
naturalRightOuterJoin
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INFORMIX,INGRES,MARIADB,MEMSQL,MYSQL,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull Table<Record> naturalRightOuterJoin(Name name)
NATURAL RIGHT OUTER JOINa 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 Also:
DSL.table(Name)
-
naturalFullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull Table<Record> naturalFullOuterJoin(TableLike<?> table)
NATURAL FULL OUTER JOINa 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.
-
naturalFullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalFullOuterJoin(SQL sql)
NATURAL FULL OUTER JOINa 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 Also:
DSL.table(SQL),SQL
-
naturalFullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalFullOuterJoin(String sql)
NATURAL FULL OUTER JOINa 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 Also:
DSL.table(String),SQL
-
naturalFullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalFullOuterJoin(String sql, Object... bindings)
NATURAL FULL OUTER JOINa 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!
-
naturalFullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @PlainSQL @NotNull Table<Record> naturalFullOuterJoin(String sql, QueryPart... parts)
NATURAL FULL OUTER JOINa 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!
-
naturalFullOuterJoin
@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,DB2,FIREBIRD,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SQLDATAWAREHOUSE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull Table<Record> naturalFullOuterJoin(Name name)
NATURAL FULL OUTER JOINa 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 Also:
DSL.table(Name)
-
crossApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @NotNull Table<Record> crossApply(TableLike<?> table)
CROSS APPLYa table to this table.
-
crossApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> crossApply(SQL sql)
CROSS APPLYa 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 Also:
DSL.table(SQL),SQL
-
crossApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> crossApply(String sql)
CROSS APPLYa 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 Also:
DSL.table(String),SQL
-
crossApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> crossApply(String sql, Object... bindings)
CROSS APPLYa 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!
-
crossApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> crossApply(String sql, QueryPart... parts)
CROSS APPLYa 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!
-
crossApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @NotNull Table<Record> crossApply(Name name)
CROSS APPLYa table to this table.- See Also:
DSL.table(Name)
-
outerApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @NotNull Table<Record> outerApply(TableLike<?> table)
OUTER APPLYa table to this table.
-
outerApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> outerApply(SQL sql)
OUTER APPLYa 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 Also:
DSL.table(SQL),SQL
-
outerApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> outerApply(String sql)
OUTER APPLYa 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 Also:
DSL.table(String),SQL
-
outerApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> outerApply(String sql, Object... bindings)
OUTER APPLYa 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!
-
outerApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @PlainSQL @NotNull Table<Record> outerApply(String sql, QueryPart... parts)
OUTER APPLYa 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!
-
outerApply
@NotNull @Support({AURORA_POSTGRES,DB2,ORACLE12C,POSTGRES_9_3,SQLDATAWAREHOUSE,SQLSERVER,SYBASE}) @NotNull Table<Record> outerApply(Name name)
OUTER APPLYa table to this table.- See Also:
DSL.table(Name)
-
straightJoin
@NotNull @Support({AURORA_MYSQL,MARIADB,MEMSQL,MYSQL}) @NotNull TableOnStep<Record> straightJoin(TableLike<?> table)
STRAIGHT_JOINa table to this table.
-
straightJoin
@NotNull @Support({AURORA_MYSQL,MARIADB,MEMSQL,MYSQL}) @PlainSQL @NotNull TableOnStep<Record> straightJoin(SQL sql)
STRAIGHT_JOINa 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 Also:
DSL.table(SQL),SQL
-
straightJoin
@NotNull @Support({AURORA_MYSQL,MARIADB,MEMSQL,MYSQL}) @PlainSQL @NotNull TableOnStep<Record> straightJoin(String sql)
STRAIGHT_JOINa 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 Also:
DSL.table(String),SQL
-
straightJoin
@NotNull @Support({AURORA_MYSQL,MARIADB,MEMSQL,MYSQL}) @PlainSQL @NotNull TableOnStep<Record> straightJoin(String sql, Object... bindings)
STRAIGHT_JOINa 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!
-
straightJoin
@NotNull @Support({AURORA_MYSQL,MARIADB,MEMSQL,MYSQL}) @PlainSQL @NotNull TableOnStep<Record> straightJoin(String sql, QueryPart... parts)
STRAIGHT_JOINa 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!
-
straightJoin
@NotNull @Support({AURORA_MYSQL,MARIADB,MEMSQL,MYSQL}) @PlainSQL @NotNull TableOnStep<Record> straightJoin(Name name)
STRAIGHT_JOINa table to this table.- See Also:
DSL.table(Name)
-
eq
@NotNull @Support @NotNull Condition eq(Table<R> 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));- See Also:
equal(Table)
-
equal
@NotNull @Support @NotNull Condition equal(Table<R> 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));
-
equals
boolean equals(Object other)
Check whether thisQueryPartcan be considered equal to anotherQueryPart.In general,
QueryPartequality is defined in terms ofQueryPart.toString()equality. In other words, two query parts are considered equal if their rendered SQL (with inlined bind variables) is equal. This means that the two query parts do not necessarily have to be of the same type.Some
QueryPartimplementations may choose to override this behaviour for improved performance, asQueryPart.toString()is an expensive operation, if called many times.Watch out! This is
Object.equals(Object), not a jOOQ DSL feature!
-
ne
@NotNull @Support @NotNull Condition ne(Table<R> 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));- See Also:
notEqual(Table)
-
notEqual
@NotNull @Support @NotNull Condition notEqual(Table<R> 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));
-
useIndex
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> useIndex(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndex("MY_INDEX") .fetch();
-
useIndexForJoin
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> useIndexForJoin(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForJoin("MY_INDEX") .fetch();
-
useIndexForOrderBy
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> useIndexForOrderBy(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForOrderBy("MY_INDEX") .fetch();
-
useIndexForGroupBy
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> useIndexForGroupBy(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForGroupBy("MY_INDEX") .fetch();
-
ignoreIndex
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> ignoreIndex(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndex("MY_INDEX") .fetch();
-
ignoreIndexForJoin
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> ignoreIndexForJoin(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForJoin("MY_INDEX") .fetch();
-
ignoreIndexForOrderBy
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> ignoreIndexForOrderBy(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForOrderBy("MY_INDEX") .fetch();
-
ignoreIndexForGroupBy
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> ignoreIndexForGroupBy(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForGroupBy("MY_INDEX") .fetch();
-
forceIndex
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> forceIndex(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndex("MY_INDEX") .fetch();
-
forceIndexForJoin
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> forceIndexForJoin(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForJoin("MY_INDEX") .fetch();
-
forceIndexForOrderBy
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> forceIndexForOrderBy(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForOrderBy("MY_INDEX") .fetch();
-
forceIndexForGroupBy
@NotNull @Support({MARIADB,MYSQL}) @NotNull Table<R> forceIndexForGroupBy(String... indexes)
Specify a MySQL style table hint for query optimisation.Example:
create.select() .from(BOOK.as("b").useIndexForGroupBy("MY_INDEX") .fetch();
-
with
@NotNull @Support({SQLSERVER,SYBASE}) @PlainSQL @Pro @NotNull Table<R> with(String hint)
Specify a SQL Server style table hint for query optimisation.This makes sense only on an actual database table or view, not on other composed table sources.
Example:
create.select() .from(BOOK.as("b").with("READUNCOMMITTED") .fetch();For
SQLDialect.ORACLEstyle hints, seeSelectFromStep.hint(String)andSelectQuery.addHint(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!
-
with
@NotNull @Support({SQLSERVER,SYBASE}) @PlainSQL @Pro @NotNull Table<R> with(String hint, Object... binds)
Specify a SQL Server style table hint for query optimisation.This makes sense only on an actual database table or view, not on other composed table sources.
Example:
create.select() .from(BOOK.as("b").with("READUNCOMMITTED") .fetch();For
SQLDialect.ORACLEstyle hints, seeSelectFromStep.hint(String)andSelectQuery.addHint(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!
-
with
@NotNull @Support({SQLSERVER,SYBASE}) @PlainSQL @Pro @NotNull Table<R> with(String hint, QueryPart... parts)
Specify a SQL Server style table hint for query optimisation.This makes sense only on an actual database table or view, not on other composed table sources.
Example:
create.select() .from(BOOK.as("b").with("READUNCOMMITTED") .fetch();For
SQLDialect.ORACLEstyle hints, seeSelectFromStep.hint(String)andSelectQuery.addHint(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!
-
with
@NotNull @Support({SQLSERVER,SYBASE}) @PlainSQL @Pro @NotNull Table<R> with(SQL hint)
Specify a SQL Server style table hint for query optimisation.This makes sense only on an actual database table or view, not on other composed table sources.
Example:
create.select() .from(BOOK.as("b").with("READUNCOMMITTED") .fetch();For
SQLDialect.ORACLEstyle hints, seeSelectFromStep.hint(String)andSelectQuery.addHint(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!
-
pivot
@NotNull @Support(ORACLE11G) @Pro @NotNull PivotForStep pivot(Field<?>... aggregateFunctions)
Create a newTABLEreference from this table, pivoting it into another form.This has been observed to work with
-
SQLDialect.ORACLE11Gupwards -
SQLDialect.SQLSERVER(not yet officially supported) - Other dialects by using some means of emulation (not yet officially supported)
- Parameters:
aggregateFunctions- The aggregate functions used for pivoting.- Returns:
- A DSL object to create the
PIVOTexpression
-
-
pivot
@NotNull @Support(ORACLE11G) @Pro @NotNull PivotForStep pivot(Collection<? extends Field<?>> aggregateFunctions)
Create a newTABLEreference from this table, pivoting it into another form.For more details, see
pivot(Field...)- Parameters:
aggregateFunctions- The aggregate functions used for pivoting.- Returns:
- A DSL object to create the
PIVOTexpression - See Also:
pivot(Field...)
-
divideBy
@NotNull @Support({ACCESS,ASE,AURORA_MYSQL,AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,REDSHIFT,SQLDATAWAREHOUSE,SQLITE,SQLSERVER,SYBASE,TERADATA,VERTICA}) @NotNull DivideByOnStep divideBy(Table<?> divisor)
Create a newTABLEreference 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(...)andreturning(...)clauses.For more information about relational division and some nice, real-life examples, see
- http ://en.wikipedia.org/wiki/Relational_algebra#Division
- http://www.simple-talk.com/sql/t-sql-programming/divided-we-stand-the- sql-of-relational-division/
This has been observed to work with all dialects
-
leftSemiJoin
@NotNull @Support @NotNull TableOnStep<R> leftSemiJoin(TableLike<?> table)
A syntheticLEFT SEMI JOINclause that translates to an equivalentEXISTSpredicate.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
WHEREorSELECTor any other clause thanON.
-
leftAntiJoin
@NotNull @Support @NotNull TableOnStep<R> leftAntiJoin(TableLike<?> table)
A syntheticLEFT ANTI JOINclause that translates to an equivalentNOT EXISTSpredicate.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
WHEREorSELECTor any other clause thanON.
-
for_
@NotNull @Support({DB2,HSQLDB,MARIADB_10_3,ORACLE12C,SQLSERVER2016}) @Pro @NotNull Table<R> for_(PeriodSpecification periodSpecification)
Create a reference to a temporal table with aPeriodSpecificationfor usage inSelect.
-
forPortionOf
@NotNull @Support({DB2,MARIADB_10_3}) @Pro @NotNull Table<R> forPortionOf(PeriodSpecification periodSpecification)
-
versionsBetweenScn
@NotNull @Support(ORACLE) @Pro @NotNull VersionsBetweenAndStep<R,Number> versionsBetweenScn(Number scn)
Create anSQLDialect.ORACLEflashback versions query clause from this table.
-
versionsBetweenScn
@NotNull @Support(ORACLE) @Pro @NotNull VersionsBetweenAndStep<R,Number> versionsBetweenScn(Field<? extends Number> scn)
Create anSQLDialect.ORACLEflashback versions query clause from this table.
-
versionsBetweenScnMinvalue
@NotNull @Support(ORACLE) @Pro @NotNull VersionsBetweenAndStep<R,Number> versionsBetweenScnMinvalue()
Create anSQLDialect.ORACLEflashback versions query clause from this table.
-
versionsBetweenTimestamp
@NotNull @Support(ORACLE) @Pro @NotNull VersionsBetweenAndStep<R,Timestamp> versionsBetweenTimestamp(Timestamp timestamp)
Create anSQLDialect.ORACLEflashback versions query clause from this table.
-
versionsBetweenTimestamp
@NotNull @Support(ORACLE) @Pro @NotNull VersionsBetweenAndStep<R,Timestamp> versionsBetweenTimestamp(Field<Timestamp> timestamp)
Create anSQLDialect.ORACLEflashback versions query clause from this table.
-
versionsBetweenTimestampMinvalue
@NotNull @Support(ORACLE) @Pro @NotNull VersionsBetweenAndStep<R,Timestamp> versionsBetweenTimestampMinvalue()
Create anSQLDialect.ORACLEflashback versions query clause from this table.
-
asOfScn
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> asOfScn(Number scn)
Create anSQLDialect.ORACLEflashback query clause from this table.
-
asOfScn
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> asOfScn(Field<? extends Number> scn)
Create anSQLDialect.ORACLEflashback query clause from this table.
-
asOfTimestamp
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> asOfTimestamp(Timestamp timestamp)
Create anSQLDialect.ORACLEflashback query clause from this table.
-
asOfTimestamp
@NotNull @Support(ORACLE) @Pro @NotNull Table<R> asOfTimestamp(Field<Timestamp> timestamp)
Create anSQLDialect.ORACLEflashback query clause from this table.
-
from
@NotNull R from(Record record)
The inverse operation ofRecord.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);
-
-