Top Description Methods
org.jooq

public Interface DerivedColumnList

extends QueryPart
Known Direct Implementers
org.jooq.impl.DerivedColumnListImpl
Static Imports
org.jooq.SQLDialect.FIREBIRD, .SQLDialect.H2, .SQLDialect.HSQLDB, .SQLDialect.MARIADB, .SQLDialect.MYSQL, .SQLDialect.POSTGRES, .SQLDialect.SQLITE, .SQLDialect.YUGABYTEDB

A derived column list.

Thist type models a table name and an optional "derived column list", which can be used to name both tables and columns in one go, e.g. when aliasing a derived table or a CommonTableExpression.

Example:


// Assuming import static org.jooq.impl.DSL.*;

Table<?> t = name("t").fields("v").as(select(one()));
//           ^^^^^^^^^^^^^^^^^^^^^ -- DerivedColumnList

using(configuration)
   .select()
   .from(t)
   .fetch();

Instances can be created using Name#fields(String...) and overloads.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public @NotNull QOM.UnmodifiableList<? extends Name>
$columnNames()

Experimental query object model accessor method, see also QOM.

public @NotNull Name
$tableName()

Experimental query object model accessor method, see also QOM.

public <R extends Record> @NotNull CommonTableExpression<R>
as(ResultQuery<R> query)

Specify a subselect to refer to by the DerivedColumnList to form a common table expression.

public <R extends Record> @NotNull CommonTableExpression<R>
asMaterialized(ResultQuery<R> query)

Specify a materialized subselect to refer to by the DerivedColumnList to form a common table expression.

public <R extends Record> @NotNull CommonTableExpression<R>
asNotMaterialized(ResultQuery<R> query)

Specify a non-materialized subselect to refer to by the DerivedColumnList to form a common table expression.

Inherited from org.jooq.QueryPart:
equalshashCodetoString

Method Detail

$columnNamesback to summary
public @NotNull QOM.UnmodifiableList<? extends Name> $columnNames()

Experimental query object model accessor method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
$tableNameback to summary
public @NotNull Name $tableName()

Experimental query object model accessor method, see also QOM. Subject to change in future jOOQ versions, use at your own risk.

Annotations
@Experimental
@NotNull
asback to summary
public <R extends Record> @NotNull CommonTableExpression<R> as(ResultQuery<R> query)

Specify a subselect to refer to by the DerivedColumnList to form a common table expression.

Annotations
@NotNull
@Support:FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE, YUGABYTEDB
asMaterializedback to summary
public <R extends Record> @NotNull CommonTableExpression<R> asMaterialized(ResultQuery<R> query)

Specify a materialized subselect to refer to by the DerivedColumnList to form a common table expression.

This adds the PostgreSQL 12 MATERIALIZED hint to the common table expression definition, or silently ignores it, if the hint is not supported.

Annotations
@NotNull
@Support:FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE, YUGABYTEDB
asNotMaterializedback to summary
public <R extends Record> @NotNull CommonTableExpression<R> asNotMaterialized(ResultQuery<R> query)

Specify a non-materialized subselect to refer to by the DerivedColumnList to form a common table expression.

This adds the PostgreSQL 12 NOT MATERIALIZED hint to the common table expression definition, or silently ignores it, if the hint is not supported.

Annotations
@NotNull
@Support:FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE, YUGABYTEDB