[jOOQ/jOOQ#10128] Add support for Postgres 12 materialized CTEs
This commit is contained in:
parent
f0414c4be8
commit
474657a44b
@ -37,9 +37,6 @@
|
||||
*/
|
||||
package org.jooq;
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
@ -57,6 +54,8 @@ import static org.jooq.SQLDialect.SQLITE;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A derived column list.
|
||||
* <p>
|
||||
@ -92,4 +91,28 @@ public interface DerivedColumnList extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList1 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record1<?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record1<?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record1<?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList10 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record10<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record10<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record10<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList11 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record11<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record11<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record11<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList12 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record12<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record12<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record12<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList13 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record13<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record13<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record13<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList14 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record14<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record14<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record14<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList15 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record15<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record15<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record15<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList16 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record16<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record16<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record16<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList17 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record17<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record17<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record17<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList18 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList19 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record19<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record19<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record19<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList2 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record2<?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record2<?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record2<?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList20 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record20<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record20<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record20<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList21 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record21<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record21<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record21<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList22 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record22<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record22<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record22<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList3 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record3<?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record3<?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record3<?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList4 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record4<?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record4<?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record4<?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList5 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record5<?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record5<?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record5<?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList6 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record6<?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record6<?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record6<?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList7 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record7<?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record7<?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record7<?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList8 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record8<?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record8<?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record8<?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -93,4 +93,28 @@ public interface DerivedColumnList9 extends QueryPart {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record9<?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record9<?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the
|
||||
* <code>DerivedColumnList</code> to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record9<?, ?, ?, ?, ?, ?, ?, ?, ?>> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
}
|
||||
|
||||
@ -249,6 +249,36 @@ public interface Name extends QueryPart, Comparable<Name> {
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record> CommonTableExpression<R> as(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a materialized subselect to refer to by the <code>Name</code> to
|
||||
* form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
* <p>
|
||||
* Column names are implicitly inherited from the <code>SELECT</code>
|
||||
* statement.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record> CommonTableExpression<R> asMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Specify a non-materialized subselect to refer to by the <code>Name</code>
|
||||
* to form a common table expression.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
* <p>
|
||||
* Column names are implicitly inherited from the <code>SELECT</code>
|
||||
* statement.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
<R extends Record> CommonTableExpression<R> asNotMaterialized(Select<R> select);
|
||||
|
||||
/**
|
||||
* Add a list of fields to this name to make this name a
|
||||
* {@link DerivedColumnList}.
|
||||
|
||||
@ -37,9 +37,6 @@
|
||||
*/
|
||||
package org.jooq;
|
||||
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
|
||||
// ...
|
||||
// ...
|
||||
// ...
|
||||
@ -59,6 +56,8 @@ import static org.jooq.SQLDialect.SQLITE;
|
||||
// ...
|
||||
// ...
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* This type is part of the jOOQ DSL to create {@link Select}, {@link Insert},
|
||||
* {@link Update}, {@link Delete}, {@link Merge} statements prefixed with a
|
||||
@ -97,9 +96,35 @@ import static org.jooq.SQLDialect.SQLITE;
|
||||
public interface WithAsStep {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<?> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<?> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<?> select);
|
||||
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep1 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record1<?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record1<?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record1<?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep10 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record10<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record10<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record10<?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep11 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record11<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record11<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record11<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep12 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record12<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record12<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record12<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep13 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record13<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record13<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record13<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep14 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record14<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record14<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record14<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep15 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record15<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record15<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record15<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep16 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record16<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record16<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record16<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep17 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record17<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record17<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record17<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep18 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep19 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record19<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record19<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record19<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep2 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record2<?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record2<?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record2<?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep20 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record20<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record20<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record20<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep21 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record21<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record21<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record21<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep22 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record22<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record22<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record22<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep3 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record3<?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record3<?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record3<?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep4 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record4<?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record4<?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record4<?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep5 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record5<?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record5<?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record5<?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep6 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record6<?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record6<?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record6<?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep7 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record7<?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record7<?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record7<?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep8 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record8<?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record8<?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record8<?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -78,9 +78,34 @@ import org.jetbrains.annotations.NotNull;
|
||||
public interface WithAsStep9 {
|
||||
|
||||
/**
|
||||
* Associate a subselect with a common table expression's table and column names.
|
||||
* Associate a subselect with a common table expression's table and column
|
||||
* names.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep as(Select<? extends Record9<?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a materialized subselect with a common table expression's table
|
||||
* and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>MATERIALIZED</code> hint to the common
|
||||
* table expression definition, or silently ignores it, if the hint is not
|
||||
* supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asMaterialized(Select<? extends Record9<?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
|
||||
/**
|
||||
* Associate a non-materialized subselect with a common table expression's
|
||||
* table and column names.
|
||||
* <p>
|
||||
* This adds the PostgreSQL 12 <code>NOT MATERIALIZED</code> hint to the
|
||||
* common table expression definition, or silently ignores it, if the hint
|
||||
* is not supported.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, SQLITE })
|
||||
WithStep asNotMaterialized(Select<? extends Record9<?, ?, ?, ?, ?, ?, ?, ?, ?>> select);
|
||||
}
|
||||
|
||||
@ -98,6 +98,18 @@ abstract class AbstractName extends AbstractQueryPart implements Name {
|
||||
return fields(new String[0]).as(select);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public final <R extends Record> CommonTableExpression<R> asMaterialized(Select<R> select) {
|
||||
return fields(new String[0]).asMaterialized(select);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public final <R extends Record> CommonTableExpression<R> asNotMaterialized(Select<R> select) {
|
||||
return fields(new String[0]).asNotMaterialized(select);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final DerivedColumnListImpl fields(String... fieldNames) {
|
||||
return fields(Tools.names(fieldNames));
|
||||
|
||||
@ -37,17 +37,25 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.impl.Keywords.K_AS;
|
||||
import static org.jooq.impl.Keywords.K_MATERIALIZED;
|
||||
import static org.jooq.impl.Keywords.K_NOT;
|
||||
import static org.jooq.impl.Tools.visitSubquery;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jooq.CommonTableExpression;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.Field;
|
||||
// ...
|
||||
import org.jooq.Record;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.Select;
|
||||
import org.jooq.TableOptions;
|
||||
import org.jooq.impl.Tools.DataKey;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
@ -57,18 +65,26 @@ final class CommonTableExpressionImpl<R extends Record> extends AbstractTable<R>
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = 2520235151216758958L;
|
||||
private static final long serialVersionUID = 2520235151216758958L;
|
||||
|
||||
private final DerivedColumnListImpl name;
|
||||
private final Select<R> select;
|
||||
private final Fields<R> fields;
|
||||
private static final Set<SQLDialect> SUPPORT_MATERIALIZED = SQLDialect.supportedBy(POSTGRES);
|
||||
|
||||
CommonTableExpressionImpl(DerivedColumnListImpl name, Select<R> select) {
|
||||
|
||||
|
||||
|
||||
|
||||
private final DerivedColumnListImpl name;
|
||||
private final Select<R> select;
|
||||
private final Fields<R> fields;
|
||||
private final Boolean materialized;
|
||||
|
||||
CommonTableExpressionImpl(DerivedColumnListImpl name, Select<R> select, Boolean materialized) {
|
||||
super(TableOptions.expression(), name.name);
|
||||
|
||||
this.name = name;
|
||||
this.select = select;
|
||||
this.fields = fields1();
|
||||
this.materialized = materialized;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -85,7 +101,29 @@ final class CommonTableExpressionImpl<R extends Record> extends AbstractTable<R>
|
||||
public final void accept(Context<?> ctx) {
|
||||
if (ctx.declareCTE()) {
|
||||
ctx.visit(name).sql(' ').visit(K_AS).sql(' ');
|
||||
|
||||
Object previous = null;
|
||||
if (materialized != null) {
|
||||
if (SUPPORT_MATERIALIZED.contains(ctx.family())) {
|
||||
if (materialized)
|
||||
ctx.visit(K_MATERIALIZED).sql(' ');
|
||||
else
|
||||
ctx.visit(K_NOT).sql(' ').visit(K_MATERIALIZED).sql(' ');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
visitSubquery(ctx, select, true);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
ctx.visit(DSL.name(name.name));
|
||||
|
||||
@ -72,6 +72,7 @@ import org.jooq.Select;
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
final class DerivedColumnListImpl extends AbstractQueryPart
|
||||
implements
|
||||
|
||||
@ -130,22 +131,37 @@ implements
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public final CommonTableExpression as(Select select) {
|
||||
final CommonTableExpression as0(Select select, Boolean materialized) {
|
||||
Select<?> s = select;
|
||||
|
||||
|
||||
if (fieldNameFunction != null) {
|
||||
List<Field<?>> source = s.getSelect();
|
||||
Name[] names = new Name[source.size()];
|
||||
|
||||
for (int i = 0; i < names.length; i++)
|
||||
names[i] = DSL.name(fieldNameFunction.apply(source.get(i), i));
|
||||
return new CommonTableExpressionImpl(new DerivedColumnListImpl(name, names), s);
|
||||
|
||||
return new CommonTableExpressionImpl(new DerivedColumnListImpl(name, names), s, materialized);
|
||||
}
|
||||
|
||||
|
||||
return new CommonTableExpressionImpl(this, s);
|
||||
return new CommonTableExpressionImpl(this, s, materialized);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final CommonTableExpression as(Select select) {
|
||||
return as0(select, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final CommonTableExpression asMaterialized(Select select) {
|
||||
return as0(select, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final CommonTableExpression asNotMaterialized(Select select) {
|
||||
return as0(select, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -205,6 +205,7 @@ final class Keywords {
|
||||
static final Keyword K_INCLUDE_NULL_VALUES = keyword("include_null_values");
|
||||
static final Keyword K_INCREMENT_BY = keyword("increment by");
|
||||
static final Keyword K_INDEX = keyword("index");
|
||||
static final Keyword K_INLINE = keyword("inline");
|
||||
static final Keyword K_INNER_JOIN = keyword("inner join");
|
||||
static final Keyword K_INSERT = keyword("insert");
|
||||
static final Keyword K_INT = keyword("int");
|
||||
@ -238,6 +239,8 @@ final class Keywords {
|
||||
static final Keyword K_LOCK_IN_SHARE_MODE = keyword("lock in share mode");
|
||||
static final Keyword K_LOOP = keyword("loop");
|
||||
static final Keyword K_MATCHED = keyword("matched");
|
||||
static final Keyword K_MATERIALIZE = keyword("materialize");
|
||||
static final Keyword K_MATERIALIZED = keyword("materialized");
|
||||
static final Keyword K_MAXVALUE = keyword("maxvalue");
|
||||
static final Keyword K_MERGE_INTO = keyword("merge into");
|
||||
static final Keyword K_MILLISECOND = keyword("millisecond");
|
||||
|
||||
@ -1060,21 +1060,34 @@ final class ParserImpl implements Parser {
|
||||
|
||||
List<CommonTableExpression<?>> cte = new ArrayList<>();
|
||||
do {
|
||||
Name table = parseIdentifier(ctx);
|
||||
Name name = parseIdentifier(ctx);
|
||||
DerivedColumnList dcl = null;
|
||||
|
||||
if (parseIf(ctx, '(')) {
|
||||
List<Name> columnNames = parseIdentifiers(ctx);
|
||||
parse(ctx, ')');
|
||||
dcl = table.fields(columnNames.toArray(EMPTY_NAME));
|
||||
dcl = name.fields(columnNames.toArray(EMPTY_NAME));
|
||||
}
|
||||
|
||||
parseKeyword(ctx, "AS");
|
||||
boolean materialized = parseKeywordIf(ctx, "MATERIALIZED");
|
||||
boolean notMaterialized = !materialized && parseKeywordIf(ctx, "NOT MATERIALIZED");
|
||||
parse(ctx, '(');
|
||||
Select<?> select = parseSelect(ctx);
|
||||
parse(ctx, ')');
|
||||
|
||||
cte.add(dcl != null ? dcl.as(select) : table.as(select));
|
||||
cte.add(dcl != null
|
||||
? materialized
|
||||
? dcl.asMaterialized(select)
|
||||
: notMaterialized
|
||||
? dcl.asNotMaterialized(select)
|
||||
: dcl.as(select)
|
||||
: materialized
|
||||
? name.asMaterialized(select)
|
||||
: notMaterialized
|
||||
? name.asNotMaterialized(select)
|
||||
: name.as(select)
|
||||
);
|
||||
}
|
||||
while (parseIf(ctx, ','));
|
||||
|
||||
|
||||
@ -125,7 +125,9 @@ import static org.jooq.impl.Keywords.K_DISTINCT_ON;
|
||||
import static org.jooq.impl.Keywords.K_FROM;
|
||||
import static org.jooq.impl.Keywords.K_GROUP_BY;
|
||||
import static org.jooq.impl.Keywords.K_HAVING;
|
||||
import static org.jooq.impl.Keywords.K_INLINE;
|
||||
import static org.jooq.impl.Keywords.K_INTO;
|
||||
import static org.jooq.impl.Keywords.K_MATERIALIZE;
|
||||
import static org.jooq.impl.Keywords.K_NOCYCLE;
|
||||
import static org.jooq.impl.Keywords.K_ORDER;
|
||||
import static org.jooq.impl.Keywords.K_ORDER_BY;
|
||||
@ -1544,6 +1546,13 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (Tools.isNotEmpty(distinctOn))
|
||||
context.visit(K_DISTINCT_ON).sql(" (").visit(distinctOn).sql(')').separatorRequired(true);
|
||||
else if (distinct)
|
||||
|
||||
@ -582,6 +582,12 @@ final class Tools {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -60,6 +60,7 @@ import org.jooq.Clause;
|
||||
import org.jooq.CommonTableExpression;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.Context;
|
||||
import org.jooq.DerivedColumnList;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.InsertSetStep;
|
||||
import org.jooq.MergeUsingStep;
|
||||
@ -172,7 +173,7 @@ implements
|
||||
|
||||
|
||||
|
||||
private final CommonTableExpressionList cte;
|
||||
private final CommonTableExpressionList ctes;
|
||||
private final boolean recursive;
|
||||
private Configuration configuration;
|
||||
|
||||
@ -187,7 +188,7 @@ implements
|
||||
WithImpl(Configuration configuration, boolean recursive) {
|
||||
this.configuration = configuration;
|
||||
this.recursive = recursive;
|
||||
this.cte = new CommonTableExpressionList();
|
||||
this.ctes = new CommonTableExpressionList();
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@ -207,7 +208,7 @@ implements
|
||||
ctx.visit(K_RECURSIVE)
|
||||
.separatorRequired(true);
|
||||
|
||||
CommonTableExpressionList c = cte;
|
||||
CommonTableExpressionList c = ctes;
|
||||
|
||||
|
||||
|
||||
@ -234,16 +235,26 @@ implements
|
||||
// XXX With API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public final WithStep as(Select select) {
|
||||
private final WithStep as0(Select select, Boolean materialized) {
|
||||
DerivedColumnList dcl;
|
||||
|
||||
|
||||
if (fieldNameFunction != null)
|
||||
cte.add(name(alias).fields(fieldNameFunction).as(select));
|
||||
dcl = name(alias).fields(fieldNameFunction);
|
||||
else
|
||||
|
||||
cte.add(name(alias).fields(fieldAliases).as(select));
|
||||
dcl = name(alias).fields(fieldAliases);
|
||||
|
||||
CommonTableExpression cte;
|
||||
|
||||
if (materialized == null)
|
||||
cte = dcl.as(select);
|
||||
else if (materialized)
|
||||
cte = dcl.asMaterialized(select);
|
||||
else
|
||||
cte = dcl.asNotMaterialized(select);
|
||||
|
||||
this.ctes.add(cte);
|
||||
this.alias = null;
|
||||
this.fieldAliases = null;
|
||||
|
||||
@ -253,6 +264,21 @@ implements
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final WithStep as(Select select) {
|
||||
return as0(select, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final WithStep asMaterialized(Select select) {
|
||||
return as0(select, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final WithStep asNotMaterialized(Select select) {
|
||||
return as0(select, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final WithImpl with(String a) {
|
||||
return with(DSL.name(a));
|
||||
@ -536,7 +562,7 @@ implements
|
||||
@Override
|
||||
public final WithStep with(Collection<? extends CommonTableExpression<?>> tables) {
|
||||
for (CommonTableExpression<?> table : tables)
|
||||
cte.add(table);
|
||||
ctes.add(table);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
10
pom.xml
10
pom.xml
@ -167,7 +167,7 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.xtend</groupId>
|
||||
<artifactId>org.eclipse.xtend.lib</artifactId>
|
||||
<version>2.20.0</version>
|
||||
<version>2.22.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- From JDK 9 onwards, the JAXB dependency needs to be made explicit -->
|
||||
@ -538,7 +538,7 @@
|
||||
<plugin>
|
||||
<groupId>org.eclipse.xtend</groupId>
|
||||
<artifactId>xtend-maven-plugin</artifactId>
|
||||
<version>2.20.0</version>
|
||||
<version>2.22.0</version>
|
||||
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
@ -549,6 +549,12 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.2</version>
|
||||
|
||||
<configuration>
|
||||
<argLine>
|
||||
--illegal-access=deny
|
||||
</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user