Like Field, a Table is a basic building block of any
Query, as they all operate on at least one table. There are many
different types of tables, including:
DSL#table(String)DSL#table(Name)DSL#table(Select)Table#join(TableLike)CommonTableExpression)DSL#unnest(Field) and
overloadsExample:
// 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.
Table references can be used like Field in queries. This includes:
GroupField is an expression that is used in a Select
query's GROUP BY clause.SelectField is an expression that is used in a Select
query's SELECT clause, or in a DML query's
RETURNING clause, such as INSERT … RETURNING.
Other types of Table cannot be used this way, even if the type system
cannot prevent this.
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull Table | Returns: The table aliasThe alias name alias)Redeclares org. |
| public @NotNull Table | |
| public @NotNull Table | Returns: The table aliasThe alias name alias, Collection<? extends String> The field aliases. Excess aliases are ignored,
missing aliases will be substituted by this table's field
names. fieldAliases)Create an alias for this table and its fields. |
| public @NotNull Table | Returns: The table aliasThe alias name alias, Function<? super Field<?>, ? extends String> The function providing field aliases. aliasFunction)
Deprecated
for removal since 3.14. - 3.14.0 - [#10156] - These methods will be removed without
replacement from a future jOOQ.
Create an alias for this table and its fields.
|
| public @NotNull Table | Returns: The table aliasThe alias name alias, BiFunction<? super Field<?>, ? super Integer, ? extends String> The function providing field aliases. aliasFunction)
Deprecated
for removal since 3.14. - 3.14.0 - [#10156] - These methods will be removed without
replacement from a future jOOQ.
Create an alias for this table and its fields.
|
| public @NotNull Table | Returns: The table aliasThe alias name alias)Redeclares org. |
| public @NotNull Table | |
| public @NotNull Table | Returns: The table aliasThe alias name alias, Collection<? extends Name> The field aliases. Excess aliases are ignored,
missing aliases will be substituted by this table's field
names. fieldAliases)Create an alias for this table and its fields. |
| public @NotNull Table | Returns: The table aliasThe alias name alias, Function<? super Field<?>, ? extends Name> The function providing field aliases. aliasFunction)
Deprecated
for removal since 3.14. - 3.14.0 - [#10156] - These methods will be removed without
replacement from a future jOOQ.
Create an alias for this table and its fields.
|
| public @NotNull Table | Returns: The table aliasThe alias name alias, BiFunction<? super Field<?>, ? super Integer, ? extends Name> The function providing field aliases. aliasFunction)
Deprecated
for removal since 3.14. - 3.14.0 - [#10156] - These methods will be removed without
replacement from a future jOOQ.
Create an alias for this table and its fields.
|
| public @NotNull Table | |
| public @NotNull Table | Returns: The table alias.The other table whose name this table is aliased with. otherTable, Field<?>... The other fields whose field name this table's fields
are aliased with. otherFields)
Deprecated
as a consequence of
Create an alias for this table based on another table's name.
Field being deprecated.
|
| public @NotNull Table | Returns: The table alias.The other table whose name this table is aliased with. otherTable, Collection<? extends Field<?>> The other fields whose field name this table's fields
are aliased with. otherFields)Create an alias for this table based on another table's name. |
| public @NotNull Table | Returns: The table aliasThe other table whose name is used as alias name otherTable, Function<? super Field<?>, ? extends Field<?>> The function providing field aliases. aliasFunction)
Deprecated
for removal since 3.14. - 3.14.0 - [#10156] - These methods will be removed without
replacement from a future jOOQ.
Create an alias for this table and its fields.
|
| public @NotNull Table | Returns: The table aliasThe other table whose name is used as alias name otherTable, BiFunction<? super Field<?>, ? super Integer, ? extends Field<?>> The function providing field aliases. aliasFunction)
Deprecated
for removal since 3.14. - 3.14.0 - [#10156] - These methods will be removed without
replacement from a future jOOQ.
Create an alias for this table and its fields.
|
| public @NotNull QualifiedAsterisk | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull DivideByOnStep | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public boolean | equals(Object
The other other)QueryPartRedeclares org. QueryPart can be considered equal to
another QueryPart.
|
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public R | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull List | |
| public @Nullable Identity | Returns: The table'sIDENTITY information, or
null, if no such information is available.Retrieve the table's |
| public @NotNull List | |
| public @NotNull List | Returns: All keys. This is nevernull. This is never empty
for a Table with a Table#getPrimaryKey().Retrieve all of the table's primary and unique keys. |
| public @NotNull TableOptions | |
| public @Nullable UniqueKey | Returns: The primary key. This is nevernull for an updatable
table.Retrieve the table's primary key |
| public @Nullable TableField | Returns: The "timestamp" field, ornull, if this table has no
"timestamp" field.
Deprecated
as a consequence of
A "timestamp" field holding record timestamp information used for
optimistic locking
TableField being deprecated.
jOOQ supports optimistic locking in |
| public @Nullable TableField | Returns: The "version" field, ornull, if this table has no
"version" field.
Deprecated
as a consequence of
A "version" field holding record version information used for optimistic
locking
TableField being deprecated.
jOOQ supports optimistic locking in |
| public @NotNull List | Returns: This table'sFOREIGN KEY's. This is never
null.Get the list of |
| public < The other table's record type O extends Record> @NotNull List | Returns: Some other table'sFOREIGN KEY's towards an this
table. This is never null.The other table of the foreign key relationship other)Get a list of |
| public < The other table's record type O extends Record> @NotNull List | Returns: This table'sFOREIGN KEY's towards an other table.
This is never null.The other table of the foreign key relationship other)Get a list of |
| public @NotNull TableOptions. | |
| public @NotNull List | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOptionalOnStep | join(TableLike<?> table, JoinType type)
Join a table to this table using a
Depending on the |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | leftAntiJoin(TableLike<?> table)
A synthetic |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TableOnStep | leftSemiJoin(TableLike<?> table)
A synthetic |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | naturalRightOuterJoin(String sql, Object... bindings)
|
| public @NotNull Table | naturalRightOuterJoin(String sql, QueryPart... parts)
|
| public @NotNull Table | |
| public @NotNull Condition | |
| public @NotNull Condition | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull RecordType | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull TablePartitionByStep | |
| public @NotNull Field | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull TableOnStep | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | where(Condition condition)
Deprecated
as a consequence of
Add a Condition being deprecated.
WHERE clause to the table, connecting them with each
other with Operator#AND.
|
| public @NotNull Table | where(Condition... conditions)
Deprecated
as a consequence of
Add a Condition being deprecated.
WHERE clause to the table, connecting them with each
other with Operator#AND.
|
| public @NotNull Table | where(Collection<? extends Condition> conditions)
Add a |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table | |
| public @NotNull Table |