From 11e38fc938334ba79a3afc12de84f3d8119fa369 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 24 May 2023 11:23:47 +0200 Subject: [PATCH 1/4] Re-generated example code --- .../flyway/ddl/db/h2/tables/Author.java | 12 +++------ .../example/flyway/ddl/db/h2/tables/Book.java | 12 +++------ .../jooq/example/jpa/jooq/tables/Actor.java | 12 +++------ .../jooq/example/jpa/jooq/tables/Film.java | 12 +++------ .../example/jpa/jooq/tables/FilmActor.java | 12 +++------ .../example/jpa/jooq/tables/Language.java | 12 +++------ .../jooq/example/r2dbc/db/tables/Author.java | 12 +++------ .../jooq/example/r2dbc/db/tables/Book.java | 12 +++------ .../testcontainers/db/tables/Actor.java | 12 +++------ .../testcontainers/db/tables/ActorInfo.java | 25 +++-------------- .../testcontainers/db/tables/Address.java | 12 +++------ .../testcontainers/db/tables/Category.java | 12 +++------ .../testcontainers/db/tables/City.java | 12 +++------ .../testcontainers/db/tables/Country.java | 12 +++------ .../testcontainers/db/tables/Customer.java | 12 +++------ .../db/tables/CustomerList.java | 27 +++---------------- .../testcontainers/db/tables/Film.java | 12 +++------ .../testcontainers/db/tables/FilmActor.java | 12 +++------ .../db/tables/FilmCategory.java | 12 +++------ .../testcontainers/db/tables/FilmInStock.java | 7 ++++- .../testcontainers/db/tables/FilmList.java | 25 +++-------------- .../db/tables/FilmNotInStock.java | 7 ++++- .../testcontainers/db/tables/Inventory.java | 12 +++------ .../testcontainers/db/tables/Language.java | 12 +++------ .../db/tables/NicerButSlowerFilmList.java | 25 +++-------------- .../testcontainers/db/tables/Payment.java | 12 +++------ .../db/tables/PaymentP2007_01.java | 12 +++------ .../db/tables/PaymentP2007_02.java | 12 +++------ .../db/tables/PaymentP2007_03.java | 12 +++------ .../db/tables/PaymentP2007_04.java | 12 +++------ .../db/tables/PaymentP2007_05.java | 12 +++------ .../db/tables/PaymentP2007_06.java | 12 +++------ .../testcontainers/db/tables/Rental.java | 12 +++------ .../db/tables/RewardsReport.java | 7 ++++- .../db/tables/SalesByFilmCategory.java | 21 +++------------ .../db/tables/SalesByStore.java | 24 +++-------------- .../testcontainers/db/tables/Staff.java | 12 +++------ .../testcontainers/db/tables/StaffList.java | 23 +++------------- .../testcontainers/db/tables/Store.java | 12 +++------ .../testcontainersflyway/db/tables/Actor.java | 12 +++------ .../db/tables/ActorInfo.java | 25 +++-------------- .../db/tables/Address.java | 12 +++------ .../db/tables/Category.java | 12 +++------ .../testcontainersflyway/db/tables/City.java | 12 +++------ .../db/tables/Country.java | 12 +++------ .../db/tables/Customer.java | 12 +++------ .../db/tables/CustomerList.java | 27 +++---------------- .../testcontainersflyway/db/tables/Film.java | 12 +++------ .../db/tables/FilmActor.java | 12 +++------ .../db/tables/FilmCategory.java | 12 +++------ .../db/tables/FilmInStock.java | 7 ++++- .../db/tables/FilmList.java | 25 +++-------------- .../db/tables/FilmNotInStock.java | 7 ++++- .../db/tables/FlywaySchemaHistory.java | 12 +++------ .../db/tables/Inventory.java | 12 +++------ .../db/tables/Language.java | 12 +++------ .../db/tables/NicerButSlowerFilmList.java | 25 +++-------------- .../db/tables/Payment.java | 12 +++------ .../db/tables/PaymentP2007_01.java | 12 +++------ .../db/tables/PaymentP2007_02.java | 12 +++------ .../db/tables/PaymentP2007_03.java | 12 +++------ .../db/tables/PaymentP2007_04.java | 12 +++------ .../db/tables/PaymentP2007_05.java | 12 +++------ .../db/tables/PaymentP2007_06.java | 12 +++------ .../db/tables/Rental.java | 12 +++------ .../db/tables/RewardsReport.java | 7 ++++- .../db/tables/SalesByFilmCategory.java | 21 +++------------ .../db/tables/SalesByStore.java | 24 +++-------------- .../testcontainersflyway/db/tables/Staff.java | 12 +++------ .../db/tables/StaffList.java | 23 +++------------- .../testcontainersflyway/db/tables/Store.java | 12 +++------ 71 files changed, 282 insertions(+), 712 deletions(-) diff --git a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java index 5954863800..1646376dd9 100644 --- a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java +++ b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java @@ -90,15 +90,11 @@ public class Author extends TableImpl { public final TableField ADDRESS = createField(DSL.name("ADDRESS"), SQLDataType.VARCHAR(50), this, ""); private Author(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Author(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Author(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Author(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -199,7 +195,7 @@ public class Author extends TableImpl { */ @Override public Author where(Condition condition) { - return new Author(getQualifiedName(), aliased() ? this : null, condition); + return new Author(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java index 5cc34b5117..cb3954976f 100644 --- a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java +++ b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java @@ -76,15 +76,11 @@ public class Book extends TableImpl { public final TableField TITLE = createField(DSL.name("TITLE"), SQLDataType.VARCHAR(400).nullable(false), this, ""); private Book(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Book(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Book(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Book(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -189,7 +185,7 @@ public class Book extends TableImpl { */ @Override public Book where(Condition condition) { - return new Book(getQualifiedName(), aliased() ? this : null, condition); + return new Book(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java index f4d1255fec..d2b0d4b168 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java @@ -75,15 +75,11 @@ public class Actor extends TableImpl { public final TableField LASTNAME = createField(DSL.name("LASTNAME"), SQLDataType.VARCHAR(255), this, ""); private Actor(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Actor(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Actor(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Actor(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -192,7 +188,7 @@ public class Actor extends TableImpl { */ @Override public Actor where(Condition condition) { - return new Actor(getQualifiedName(), aliased() ? this : null, condition); + return new Actor(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java index 354077babb..b148b0d2c0 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java @@ -94,15 +94,11 @@ public class Film extends TableImpl { public final TableField ORIGINALLANGUAGE_LANGUAGEID = createField(DSL.name("ORIGINALLANGUAGE_LANGUAGEID"), SQLDataType.INTEGER, this, ""); private Film(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Film(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Film(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Film(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -242,7 +238,7 @@ public class Film extends TableImpl { */ @Override public Film where(Condition condition) { - return new Film(getQualifiedName(), aliased() ? this : null, condition); + return new Film(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java index df534e3456..6d533ea04a 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java @@ -72,15 +72,11 @@ public class FilmActor extends TableImpl { public final TableField ACTORS_ACTORID = createField(DSL.name("ACTORS_ACTORID"), SQLDataType.INTEGER.nullable(false), this, ""); private FilmActor(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmActor(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private FilmActor(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private FilmActor(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -197,7 +193,7 @@ public class FilmActor extends TableImpl { */ @Override public FilmActor where(Condition condition) { - return new FilmActor(getQualifiedName(), aliased() ? this : null, condition); + return new FilmActor(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java index 077d73a01a..69b1f1f2c3 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java @@ -69,15 +69,11 @@ public class Language extends TableImpl { public final TableField NAME = createField(DSL.name("NAME"), SQLDataType.VARCHAR(255), this, ""); private Language(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Language(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Language(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Language(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -191,7 +187,7 @@ public class Language extends TableImpl { */ @Override public Language where(Condition condition) { - return new Language(getQualifiedName(), aliased() ? this : null, condition); + return new Language(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java index cb72774ed8..1b770f2c24 100644 --- a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java +++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java @@ -75,15 +75,11 @@ public class Author extends TableImpl { public final TableField LAST_NAME = createField(DSL.name("LAST_NAME"), SQLDataType.VARCHAR(100).nullable(false), this, ""); private Author(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Author(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Author(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Author(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -189,7 +185,7 @@ public class Author extends TableImpl { */ @Override public Author where(Condition condition) { - return new Author(getQualifiedName(), aliased() ? this : null, condition); + return new Author(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java index 88a4136b32..2c759e6bb4 100644 --- a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java +++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java @@ -77,15 +77,11 @@ public class Book extends TableImpl { public final TableField TITLE = createField(DSL.name("TITLE"), SQLDataType.VARCHAR(100).nullable(false), this, ""); private Book(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Book(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Book(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Book(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -196,7 +192,7 @@ public class Book extends TableImpl { */ @Override public Book where(Condition condition) { - return new Book(getQualifiedName(), aliased() ? this : null, condition); + return new Book(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java index a4ac770e31..acd52224a0 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java @@ -86,15 +86,11 @@ public class Actor extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Actor(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Actor(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Actor(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Actor(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -213,7 +209,7 @@ public class Actor extends TableImpl { */ @Override public Actor where(Condition condition) { - return new Actor(getQualifiedName(), aliased() ? this : null, condition); + return new Actor(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/ActorInfo.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/ActorInfo.java index e2657c0b52..ba597768b4 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/ActorInfo.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/ActorInfo.java @@ -72,10 +72,10 @@ public class ActorInfo extends TableImpl { public final TableField FILM_INFO = createField(DSL.name("film_info"), SQLDataType.CLOB, this, ""); private ActorInfo(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private ActorInfo(Name alias, Table aliased, Field[] parameters) { + private ActorInfo(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "actor_info" as SELECT a.actor_id, a.first_name, @@ -91,25 +91,6 @@ public class ActorInfo extends TableImpl { LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id))) LEFT JOIN category c ON ((fc.category_id = c.category_id))) GROUP BY a.actor_id, a.first_name, a.last_name; - """)); - } - - private ActorInfo(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "actor_info" as SELECT a.actor_id, - a.first_name, - a.last_name, - group_concat(DISTINCT (((c.name)::text || ': '::text) || ( SELECT group_concat((f.title)::text) AS group_concat - FROM ((film f - JOIN film_category fc_1 ON ((f.film_id = fc_1.film_id))) - JOIN film_actor fa_1 ON ((f.film_id = fa_1.film_id))) - WHERE ((fc_1.category_id = c.category_id) AND (fa_1.actor_id = a.actor_id)) - GROUP BY fa_1.actor_id))) AS film_info - FROM (((actor a - LEFT JOIN film_actor fa ON ((a.actor_id = fa.actor_id))) - LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id))) - LEFT JOIN category c ON ((fc.category_id = c.category_id))) - GROUP BY a.actor_id, a.first_name, a.last_name; """), where); } @@ -183,7 +164,7 @@ public class ActorInfo extends TableImpl { */ @Override public ActorInfo where(Condition condition) { - return new ActorInfo(getQualifiedName(), aliased() ? this : null, condition); + return new ActorInfo(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java index cb834fa385..7719828b54 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java @@ -108,15 +108,11 @@ public class Address extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Address(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Address(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Address(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Address(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -268,7 +264,7 @@ public class Address extends TableImpl { */ @Override public Address where(Condition condition) { - return new Address(getQualifiedName(), aliased() ? this : null, condition); + return new Address(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java index 004b992b7b..4916af429e 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java @@ -77,15 +77,11 @@ public class Category extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Category(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Category(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Category(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Category(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -199,7 +195,7 @@ public class Category extends TableImpl { */ @Override public Category where(Condition condition) { - return new Category(getQualifiedName(), aliased() ? this : null, condition); + return new Category(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java index 236eb7cd1a..bb8796cb69 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java @@ -86,15 +86,11 @@ public class City extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private City(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private City(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private City(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private City(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -222,7 +218,7 @@ public class City extends TableImpl { */ @Override public City where(Condition condition) { - return new City(getQualifiedName(), aliased() ? this : null, condition); + return new City(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java index 3fe04e42f2..05b1b901c8 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java @@ -76,15 +76,11 @@ public class Country extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Country(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Country(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Country(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Country(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -189,7 +185,7 @@ public class Country extends TableImpl { */ @Override public Country where(Condition condition) { - return new Country(getQualifiedName(), aliased() ? this : null, condition); + return new Country(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java index 4b4df9e79e..3a8b722707 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java @@ -125,15 +125,11 @@ public class Customer extends TableImpl { public final TableField ACTIVE = createField(DSL.name("active"), SQLDataType.INTEGER, this, ""); private Customer(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Customer(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Customer(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Customer(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -364,7 +360,7 @@ public class Customer extends TableImpl { */ @Override public Customer where(Condition condition) { - return new Customer(getQualifiedName(), aliased() ? this : null, condition); + return new Customer(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/CustomerList.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/CustomerList.java index ee769c751f..5b2378fd94 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/CustomerList.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/CustomerList.java @@ -97,32 +97,11 @@ public class CustomerList extends TableImpl { public final TableField SID = createField(DSL.name("sid"), SQLDataType.BIGINT, this, ""); private CustomerList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private CustomerList(Name alias, Table aliased, Field[] parameters) { + private CustomerList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" - create view "customer_list" as SELECT cu.customer_id AS id, - (((cu.first_name)::text || ' '::text) || (cu.last_name)::text) AS name, - a.address, - a.postal_code AS "zip code", - a.phone, - city.city, - country.country, - CASE - WHEN cu.activebool THEN 'active'::text - ELSE ''::text - END AS notes, - cu.store_id AS sid - FROM (((customer cu - JOIN address a ON ((cu.address_id = a.address_id))) - JOIN city ON ((a.city_id = city.city_id))) - JOIN country ON ((city.country_id = country.country_id))); - """)); - } - - private CustomerList(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" create view "customer_list" as SELECT cu.customer_id AS id, (((cu.first_name)::text || ' '::text) || (cu.last_name)::text) AS name, a.address, @@ -212,7 +191,7 @@ public class CustomerList extends TableImpl { */ @Override public CustomerList where(Condition condition) { - return new CustomerList(getQualifiedName(), aliased() ? this : null, condition); + return new CustomerList(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java index 63cddb07b8..d661d49959 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java @@ -148,15 +148,11 @@ public class Film extends TableImpl { public final TableField FULLTEXT = createField(DSL.name("fulltext"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"tsvector\"").nullable(false), this, ""); private Film(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Film(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Film(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Film(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -340,7 +336,7 @@ public class Film extends TableImpl { */ @Override public Film where(Condition condition) { - return new Film(getQualifiedName(), aliased() ? this : null, condition); + return new Film(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java index 167b21c0a2..1713c0ae57 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java @@ -80,15 +80,11 @@ public class FilmActor extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private FilmActor(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmActor(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private FilmActor(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private FilmActor(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -210,7 +206,7 @@ public class FilmActor extends TableImpl { */ @Override public FilmActor where(Condition condition) { - return new FilmActor(getQualifiedName(), aliased() ? this : null, condition); + return new FilmActor(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java index 304b9a427c..52014e3c2c 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java @@ -78,15 +78,11 @@ public class FilmCategory extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private FilmCategory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmCategory(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private FilmCategory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private FilmCategory(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -203,7 +199,7 @@ public class FilmCategory extends TableImpl { */ @Override public FilmCategory where(Condition condition) { - return new FilmCategory(getQualifiedName(), aliased() ? this : null, condition); + return new FilmCategory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmInStock.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmInStock.java index 37e2da1e31..ac63113cd0 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmInStock.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmInStock.java @@ -6,6 +6,7 @@ package org.jooq.example.testcontainers.db.tables; import java.util.function.Function; +import org.jooq.Condition; import org.jooq.Field; import org.jooq.Function1; import org.jooq.Name; @@ -57,7 +58,11 @@ public class FilmInStock extends TableImpl { } private FilmInStock(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function()); + this(alias, aliased, parameters, null); + } + + private FilmInStock(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function(), where); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmList.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmList.java index 71234b6ea2..57144e8a44 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmList.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmList.java @@ -94,10 +94,10 @@ public class FilmList extends TableImpl { public final TableField ACTORS = createField(DSL.name("actors"), SQLDataType.CLOB, this, ""); private FilmList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmList(Name alias, Table aliased, Field[] parameters) { + private FilmList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "film_list" as SELECT film.film_id AS fid, film.title, @@ -113,25 +113,6 @@ public class FilmList extends TableImpl { JOIN film_actor ON ((film.film_id = film_actor.film_id))) JOIN actor ON ((film_actor.actor_id = actor.actor_id))) GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating; - """)); - } - - private FilmList(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "film_list" as SELECT film.film_id AS fid, - film.title, - film.description, - category.name AS category, - film.rental_rate AS price, - film.length, - film.rating, - group_concat((((actor.first_name)::text || ' '::text) || (actor.last_name)::text)) AS actors - FROM ((((category - LEFT JOIN film_category ON ((category.category_id = film_category.category_id))) - LEFT JOIN film ON ((film_category.film_id = film.film_id))) - JOIN film_actor ON ((film.film_id = film_actor.film_id))) - JOIN actor ON ((film_actor.actor_id = actor.actor_id))) - GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating; """), where); } @@ -205,7 +186,7 @@ public class FilmList extends TableImpl { */ @Override public FilmList where(Condition condition) { - return new FilmList(getQualifiedName(), aliased() ? this : null, condition); + return new FilmList(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmNotInStock.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmNotInStock.java index cf179752a5..f4a580d1ba 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmNotInStock.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmNotInStock.java @@ -6,6 +6,7 @@ package org.jooq.example.testcontainers.db.tables; import java.util.function.Function; +import org.jooq.Condition; import org.jooq.Field; import org.jooq.Function1; import org.jooq.Name; @@ -57,7 +58,11 @@ public class FilmNotInStock extends TableImpl { } private FilmNotInStock(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function()); + this(alias, aliased, parameters, null); + } + + private FilmNotInStock(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function(), where); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java index 020511afa2..51872c9fc7 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java @@ -87,15 +87,11 @@ public class Inventory extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Inventory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Inventory(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Inventory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Inventory(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -235,7 +231,7 @@ public class Inventory extends TableImpl { */ @Override public Inventory where(Condition condition) { - return new Inventory(getQualifiedName(), aliased() ? this : null, condition); + return new Inventory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java index d0bb61df9f..9619d55499 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java @@ -76,15 +76,11 @@ public class Language extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Language(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Language(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Language(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Language(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -203,7 +199,7 @@ public class Language extends TableImpl { */ @Override public Language where(Condition condition) { - return new Language(getQualifiedName(), aliased() ? this : null, condition); + return new Language(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/NicerButSlowerFilmList.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/NicerButSlowerFilmList.java index dd50eb9f5d..e75fde7d50 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/NicerButSlowerFilmList.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/NicerButSlowerFilmList.java @@ -94,10 +94,10 @@ public class NicerButSlowerFilmList extends TableImpl ACTORS = createField(DSL.name("actors"), SQLDataType.CLOB, this, ""); private NicerButSlowerFilmList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private NicerButSlowerFilmList(Name alias, Table aliased, Field[] parameters) { + private NicerButSlowerFilmList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "nicer_but_slower_film_list" as SELECT film.film_id AS fid, film.title, @@ -113,25 +113,6 @@ public class NicerButSlowerFilmList extends TableImpl aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "nicer_but_slower_film_list" as SELECT film.film_id AS fid, - film.title, - film.description, - category.name AS category, - film.rental_rate AS price, - film.length, - film.rating, - group_concat((((upper("substring"((actor.first_name)::text, 1, 1)) || lower("substring"((actor.first_name)::text, 2))) || upper("substring"((actor.last_name)::text, 1, 1))) || lower("substring"((actor.last_name)::text, 2)))) AS actors - FROM ((((category - LEFT JOIN film_category ON ((category.category_id = film_category.category_id))) - LEFT JOIN film ON ((film_category.film_id = film.film_id))) - JOIN film_actor ON ((film.film_id = film_actor.film_id))) - JOIN actor ON ((film_actor.actor_id = actor.actor_id))) - GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating; """), where); } @@ -207,7 +188,7 @@ public class NicerButSlowerFilmList extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private Payment(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Payment(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Payment(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Payment(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -245,7 +241,7 @@ public class Payment extends TableImpl { */ @Override public Payment where(Condition condition) { - return new Payment(getQualifiedName(), aliased() ? this : null, condition); + return new Payment(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java index f4870f59f4..9bbe3615bb 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java @@ -99,15 +99,11 @@ public class PaymentP2007_01 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_01(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_01(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_01(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_01(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_01 extends TableImpl { */ @Override public PaymentP2007_01 where(Condition condition) { - return new PaymentP2007_01(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_01(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java index 8b07fa1768..581719e44d 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java @@ -99,15 +99,11 @@ public class PaymentP2007_02 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_02(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_02(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_02(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_02(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_02 extends TableImpl { */ @Override public PaymentP2007_02 where(Condition condition) { - return new PaymentP2007_02(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_02(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java index 745ce57e8a..42e67f3f37 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java @@ -99,15 +99,11 @@ public class PaymentP2007_03 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_03(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_03(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_03(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_03(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_03 extends TableImpl { */ @Override public PaymentP2007_03 where(Condition condition) { - return new PaymentP2007_03(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_03(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java index 49802ee23b..62f352fe4f 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java @@ -99,15 +99,11 @@ public class PaymentP2007_04 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_04(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_04(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_04(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_04(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_04 extends TableImpl { */ @Override public PaymentP2007_04 where(Condition condition) { - return new PaymentP2007_04(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_04(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java index dbff75a4ac..929484b124 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java @@ -99,15 +99,11 @@ public class PaymentP2007_05 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_05(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_05(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_05(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_05(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_05 extends TableImpl { */ @Override public PaymentP2007_05 where(Condition condition) { - return new PaymentP2007_05(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_05(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java index c811894f47..7204bce105 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java @@ -99,15 +99,11 @@ public class PaymentP2007_06 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_06(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_06(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_06(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_06(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_06 extends TableImpl { */ @Override public PaymentP2007_06 where(Condition condition) { - return new PaymentP2007_06(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_06(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java index 92da6a833e..6d91679371 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java @@ -109,15 +109,11 @@ public class Rental extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Rental(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Rental(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Rental(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Rental(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -347,7 +343,7 @@ public class Rental extends TableImpl { */ @Override public Rental where(Condition condition) { - return new Rental(getQualifiedName(), aliased() ? this : null, condition); + return new Rental(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/RewardsReport.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/RewardsReport.java index 27fd80d9f0..e5db231122 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/RewardsReport.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/RewardsReport.java @@ -9,6 +9,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.util.function.Function; +import org.jooq.Condition; import org.jooq.Field; import org.jooq.Function10; import org.jooq.Identity; @@ -106,7 +107,11 @@ public class RewardsReport extends TableImpl { } private RewardsReport(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function()); + this(alias, aliased, parameters, null); + } + + private RewardsReport(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function(), where); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByFilmCategory.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByFilmCategory.java index 7487db66dd..5335aa3047 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByFilmCategory.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByFilmCategory.java @@ -63,10 +63,10 @@ public class SalesByFilmCategory extends TableImpl { public final TableField TOTAL_SALES = createField(DSL.name("total_sales"), SQLDataType.NUMERIC, this, ""); private SalesByFilmCategory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private SalesByFilmCategory(Name alias, Table aliased, Field[] parameters) { + private SalesByFilmCategory(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "sales_by_film_category" as SELECT c.name AS category, sum(p.amount) AS total_sales @@ -78,21 +78,6 @@ public class SalesByFilmCategory extends TableImpl { JOIN category c ON ((fc.category_id = c.category_id))) GROUP BY c.name ORDER BY (sum(p.amount)) DESC; - """)); - } - - private SalesByFilmCategory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "sales_by_film_category" as SELECT c.name AS category, - sum(p.amount) AS total_sales - FROM (((((payment p - JOIN rental r ON ((p.rental_id = r.rental_id))) - JOIN inventory i ON ((r.inventory_id = i.inventory_id))) - JOIN film f ON ((i.film_id = f.film_id))) - JOIN film_category fc ON ((f.film_id = fc.film_id))) - JOIN category c ON ((fc.category_id = c.category_id))) - GROUP BY c.name - ORDER BY (sum(p.amount)) DESC; """), where); } @@ -168,7 +153,7 @@ public class SalesByFilmCategory extends TableImpl { */ @Override public SalesByFilmCategory where(Condition condition) { - return new SalesByFilmCategory(getQualifiedName(), aliased() ? this : null, condition); + return new SalesByFilmCategory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByStore.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByStore.java index 5523518472..539bba3bc2 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByStore.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/SalesByStore.java @@ -68,10 +68,10 @@ public class SalesByStore extends TableImpl { public final TableField TOTAL_SALES = createField(DSL.name("total_sales"), SQLDataType.NUMERIC, this, ""); private SalesByStore(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private SalesByStore(Name alias, Table aliased, Field[] parameters) { + private SalesByStore(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "sales_by_store" as SELECT (((c.city)::text || ','::text) || (cy.country)::text) AS store, (((m.first_name)::text || ' '::text) || (m.last_name)::text) AS manager, @@ -86,24 +86,6 @@ public class SalesByStore extends TableImpl { JOIN staff m ON ((s.manager_staff_id = m.staff_id))) GROUP BY cy.country, c.city, s.store_id, m.first_name, m.last_name ORDER BY cy.country, c.city; - """)); - } - - private SalesByStore(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "sales_by_store" as SELECT (((c.city)::text || ','::text) || (cy.country)::text) AS store, - (((m.first_name)::text || ' '::text) || (m.last_name)::text) AS manager, - sum(p.amount) AS total_sales - FROM (((((((payment p - JOIN rental r ON ((p.rental_id = r.rental_id))) - JOIN inventory i ON ((r.inventory_id = i.inventory_id))) - JOIN store s ON ((i.store_id = s.store_id))) - JOIN address a ON ((s.address_id = a.address_id))) - JOIN city c ON ((a.city_id = c.city_id))) - JOIN country cy ON ((c.country_id = cy.country_id))) - JOIN staff m ON ((s.manager_staff_id = m.staff_id))) - GROUP BY cy.country, c.city, s.store_id, m.first_name, m.last_name - ORDER BY cy.country, c.city; """), where); } @@ -177,7 +159,7 @@ public class SalesByStore extends TableImpl { */ @Override public SalesByStore where(Condition condition) { - return new SalesByStore(getQualifiedName(), aliased() ? this : null, condition); + return new SalesByStore(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java index a60d1ca69a..aec520f3f7 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java @@ -127,15 +127,11 @@ public class Staff extends TableImpl { public final TableField PICTURE = createField(DSL.name("picture"), SQLDataType.BLOB, this, ""); private Staff(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Staff(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Staff(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Staff(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -361,7 +357,7 @@ public class Staff extends TableImpl { */ @Override public Staff where(Condition condition) { - return new Staff(getQualifiedName(), aliased() ? this : null, condition); + return new Staff(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/StaffList.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/StaffList.java index fbe7b6477e..57fc8a7f7d 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/StaffList.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/StaffList.java @@ -92,28 +92,11 @@ public class StaffList extends TableImpl { public final TableField SID = createField(DSL.name("sid"), SQLDataType.BIGINT, this, ""); private StaffList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private StaffList(Name alias, Table aliased, Field[] parameters) { + private StaffList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" - create view "staff_list" as SELECT s.staff_id AS id, - (((s.first_name)::text || ' '::text) || (s.last_name)::text) AS name, - a.address, - a.postal_code AS "zip code", - a.phone, - city.city, - country.country, - s.store_id AS sid - FROM (((staff s - JOIN address a ON ((s.address_id = a.address_id))) - JOIN city ON ((a.city_id = city.city_id))) - JOIN country ON ((city.country_id = country.country_id))); - """)); - } - - private StaffList(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" create view "staff_list" as SELECT s.staff_id AS id, (((s.first_name)::text || ' '::text) || (s.last_name)::text) AS name, a.address, @@ -199,7 +182,7 @@ public class StaffList extends TableImpl { */ @Override public StaffList where(Condition condition) { - return new StaffList(getQualifiedName(), aliased() ? this : null, condition); + return new StaffList(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java index 2c02910494..745ed29946 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java @@ -88,15 +88,11 @@ public class Store extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Store(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Store(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Store(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Store(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -249,7 +245,7 @@ public class Store extends TableImpl { */ @Override public Store where(Condition condition) { - return new Store(getQualifiedName(), aliased() ? this : null, condition); + return new Store(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java index 5594c07888..e6c1b8e5e0 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java @@ -86,15 +86,11 @@ public class Actor extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Actor(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Actor(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Actor(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Actor(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -213,7 +209,7 @@ public class Actor extends TableImpl { */ @Override public Actor where(Condition condition) { - return new Actor(getQualifiedName(), aliased() ? this : null, condition); + return new Actor(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/ActorInfo.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/ActorInfo.java index 8e43bc4ba1..f65bbcdeb5 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/ActorInfo.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/ActorInfo.java @@ -72,10 +72,10 @@ public class ActorInfo extends TableImpl { public final TableField FILM_INFO = createField(DSL.name("film_info"), SQLDataType.CLOB, this, ""); private ActorInfo(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private ActorInfo(Name alias, Table aliased, Field[] parameters) { + private ActorInfo(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "actor_info" as SELECT a.actor_id, a.first_name, @@ -91,25 +91,6 @@ public class ActorInfo extends TableImpl { LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id))) LEFT JOIN category c ON ((fc.category_id = c.category_id))) GROUP BY a.actor_id, a.first_name, a.last_name; - """)); - } - - private ActorInfo(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "actor_info" as SELECT a.actor_id, - a.first_name, - a.last_name, - group_concat(DISTINCT (((c.name)::text || ': '::text) || ( SELECT group_concat((f.title)::text) AS group_concat - FROM ((film f - JOIN film_category fc_1 ON ((f.film_id = fc_1.film_id))) - JOIN film_actor fa_1 ON ((f.film_id = fa_1.film_id))) - WHERE ((fc_1.category_id = c.category_id) AND (fa_1.actor_id = a.actor_id)) - GROUP BY fa_1.actor_id))) AS film_info - FROM (((actor a - LEFT JOIN film_actor fa ON ((a.actor_id = fa.actor_id))) - LEFT JOIN film_category fc ON ((fa.film_id = fc.film_id))) - LEFT JOIN category c ON ((fc.category_id = c.category_id))) - GROUP BY a.actor_id, a.first_name, a.last_name; """), where); } @@ -183,7 +164,7 @@ public class ActorInfo extends TableImpl { */ @Override public ActorInfo where(Condition condition) { - return new ActorInfo(getQualifiedName(), aliased() ? this : null, condition); + return new ActorInfo(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java index 8b79592bc6..a74ad86d9e 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java @@ -108,15 +108,11 @@ public class Address extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Address(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Address(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Address(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Address(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -268,7 +264,7 @@ public class Address extends TableImpl { */ @Override public Address where(Condition condition) { - return new Address(getQualifiedName(), aliased() ? this : null, condition); + return new Address(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java index 4b690868ef..77e4e8baf6 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java @@ -77,15 +77,11 @@ public class Category extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Category(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Category(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Category(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Category(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -199,7 +195,7 @@ public class Category extends TableImpl { */ @Override public Category where(Condition condition) { - return new Category(getQualifiedName(), aliased() ? this : null, condition); + return new Category(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java index 6c68ebb6f5..7cac05f6d9 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java @@ -86,15 +86,11 @@ public class City extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private City(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private City(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private City(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private City(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -222,7 +218,7 @@ public class City extends TableImpl { */ @Override public City where(Condition condition) { - return new City(getQualifiedName(), aliased() ? this : null, condition); + return new City(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java index d3d4bb0270..6ac2696c68 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java @@ -76,15 +76,11 @@ public class Country extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Country(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Country(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Country(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Country(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -189,7 +185,7 @@ public class Country extends TableImpl { */ @Override public Country where(Condition condition) { - return new Country(getQualifiedName(), aliased() ? this : null, condition); + return new Country(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java index 995f593755..5e93dc64a9 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java @@ -125,15 +125,11 @@ public class Customer extends TableImpl { public final TableField ACTIVE = createField(DSL.name("active"), SQLDataType.INTEGER, this, ""); private Customer(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Customer(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Customer(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Customer(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -364,7 +360,7 @@ public class Customer extends TableImpl { */ @Override public Customer where(Condition condition) { - return new Customer(getQualifiedName(), aliased() ? this : null, condition); + return new Customer(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/CustomerList.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/CustomerList.java index 7b8b2a5041..ae1678b7b7 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/CustomerList.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/CustomerList.java @@ -97,32 +97,11 @@ public class CustomerList extends TableImpl { public final TableField SID = createField(DSL.name("sid"), SQLDataType.BIGINT, this, ""); private CustomerList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private CustomerList(Name alias, Table aliased, Field[] parameters) { + private CustomerList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" - create view "customer_list" as SELECT cu.customer_id AS id, - (((cu.first_name)::text || ' '::text) || (cu.last_name)::text) AS name, - a.address, - a.postal_code AS "zip code", - a.phone, - city.city, - country.country, - CASE - WHEN cu.activebool THEN 'active'::text - ELSE ''::text - END AS notes, - cu.store_id AS sid - FROM (((customer cu - JOIN address a ON ((cu.address_id = a.address_id))) - JOIN city ON ((a.city_id = city.city_id))) - JOIN country ON ((city.country_id = country.country_id))); - """)); - } - - private CustomerList(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" create view "customer_list" as SELECT cu.customer_id AS id, (((cu.first_name)::text || ' '::text) || (cu.last_name)::text) AS name, a.address, @@ -212,7 +191,7 @@ public class CustomerList extends TableImpl { */ @Override public CustomerList where(Condition condition) { - return new CustomerList(getQualifiedName(), aliased() ? this : null, condition); + return new CustomerList(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java index ef697545d3..dc1500f816 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java @@ -148,15 +148,11 @@ public class Film extends TableImpl { public final TableField FULLTEXT = createField(DSL.name("fulltext"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"pg_catalog\".\"tsvector\"").nullable(false), this, ""); private Film(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Film(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Film(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Film(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -340,7 +336,7 @@ public class Film extends TableImpl { */ @Override public Film where(Condition condition) { - return new Film(getQualifiedName(), aliased() ? this : null, condition); + return new Film(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java index d0ecb0d513..6fc834986f 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java @@ -80,15 +80,11 @@ public class FilmActor extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private FilmActor(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmActor(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private FilmActor(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private FilmActor(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -210,7 +206,7 @@ public class FilmActor extends TableImpl { */ @Override public FilmActor where(Condition condition) { - return new FilmActor(getQualifiedName(), aliased() ? this : null, condition); + return new FilmActor(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java index 729ce8c365..507fe8ae43 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java @@ -78,15 +78,11 @@ public class FilmCategory extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private FilmCategory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmCategory(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private FilmCategory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private FilmCategory(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -203,7 +199,7 @@ public class FilmCategory extends TableImpl { */ @Override public FilmCategory where(Condition condition) { - return new FilmCategory(getQualifiedName(), aliased() ? this : null, condition); + return new FilmCategory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmInStock.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmInStock.java index 91904f4ea2..fe9e1b6af9 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmInStock.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmInStock.java @@ -6,6 +6,7 @@ package org.jooq.example.testcontainersflyway.db.tables; import java.util.function.Function; +import org.jooq.Condition; import org.jooq.Field; import org.jooq.Function1; import org.jooq.Name; @@ -57,7 +58,11 @@ public class FilmInStock extends TableImpl { } private FilmInStock(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function()); + this(alias, aliased, parameters, null); + } + + private FilmInStock(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function(), where); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmList.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmList.java index 85923ff657..d59273448c 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmList.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmList.java @@ -94,10 +94,10 @@ public class FilmList extends TableImpl { public final TableField ACTORS = createField(DSL.name("actors"), SQLDataType.CLOB, this, ""); private FilmList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FilmList(Name alias, Table aliased, Field[] parameters) { + private FilmList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "film_list" as SELECT film.film_id AS fid, film.title, @@ -113,25 +113,6 @@ public class FilmList extends TableImpl { JOIN film_actor ON ((film.film_id = film_actor.film_id))) JOIN actor ON ((film_actor.actor_id = actor.actor_id))) GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating; - """)); - } - - private FilmList(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "film_list" as SELECT film.film_id AS fid, - film.title, - film.description, - category.name AS category, - film.rental_rate AS price, - film.length, - film.rating, - group_concat((((actor.first_name)::text || ' '::text) || (actor.last_name)::text)) AS actors - FROM ((((category - LEFT JOIN film_category ON ((category.category_id = film_category.category_id))) - LEFT JOIN film ON ((film_category.film_id = film.film_id))) - JOIN film_actor ON ((film.film_id = film_actor.film_id))) - JOIN actor ON ((film_actor.actor_id = actor.actor_id))) - GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating; """), where); } @@ -205,7 +186,7 @@ public class FilmList extends TableImpl { */ @Override public FilmList where(Condition condition) { - return new FilmList(getQualifiedName(), aliased() ? this : null, condition); + return new FilmList(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmNotInStock.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmNotInStock.java index 1eca6bbd26..9ae30ccb08 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmNotInStock.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmNotInStock.java @@ -6,6 +6,7 @@ package org.jooq.example.testcontainersflyway.db.tables; import java.util.function.Function; +import org.jooq.Condition; import org.jooq.Field; import org.jooq.Function1; import org.jooq.Name; @@ -57,7 +58,11 @@ public class FilmNotInStock extends TableImpl { } private FilmNotInStock(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function()); + this(alias, aliased, parameters, null); + } + + private FilmNotInStock(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function(), where); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FlywaySchemaHistory.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FlywaySchemaHistory.java index 6c9cbc620e..f1d2550597 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FlywaySchemaHistory.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FlywaySchemaHistory.java @@ -109,15 +109,11 @@ public class FlywaySchemaHistory extends TableImpl { public final TableField SUCCESS = createField(DSL.name("success"), SQLDataType.BOOLEAN.nullable(false), this, ""); private FlywaySchemaHistory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private FlywaySchemaHistory(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private FlywaySchemaHistory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private FlywaySchemaHistory(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -202,7 +198,7 @@ public class FlywaySchemaHistory extends TableImpl { */ @Override public FlywaySchemaHistory where(Condition condition) { - return new FlywaySchemaHistory(getQualifiedName(), aliased() ? this : null, condition); + return new FlywaySchemaHistory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java index 40e3727e4c..e526bb4636 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java @@ -87,15 +87,11 @@ public class Inventory extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Inventory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Inventory(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Inventory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Inventory(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -235,7 +231,7 @@ public class Inventory extends TableImpl { */ @Override public Inventory where(Condition condition) { - return new Inventory(getQualifiedName(), aliased() ? this : null, condition); + return new Inventory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java index 8433b0ff34..5cc5fcb9d2 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java @@ -76,15 +76,11 @@ public class Language extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Language(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Language(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Language(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Language(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -203,7 +199,7 @@ public class Language extends TableImpl { */ @Override public Language where(Condition condition) { - return new Language(getQualifiedName(), aliased() ? this : null, condition); + return new Language(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/NicerButSlowerFilmList.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/NicerButSlowerFilmList.java index 7cc64fb470..282d728eb3 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/NicerButSlowerFilmList.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/NicerButSlowerFilmList.java @@ -94,10 +94,10 @@ public class NicerButSlowerFilmList extends TableImpl ACTORS = createField(DSL.name("actors"), SQLDataType.CLOB, this, ""); private NicerButSlowerFilmList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private NicerButSlowerFilmList(Name alias, Table aliased, Field[] parameters) { + private NicerButSlowerFilmList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "nicer_but_slower_film_list" as SELECT film.film_id AS fid, film.title, @@ -113,25 +113,6 @@ public class NicerButSlowerFilmList extends TableImpl aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "nicer_but_slower_film_list" as SELECT film.film_id AS fid, - film.title, - film.description, - category.name AS category, - film.rental_rate AS price, - film.length, - film.rating, - group_concat((((upper("substring"((actor.first_name)::text, 1, 1)) || lower("substring"((actor.first_name)::text, 2))) || upper("substring"((actor.last_name)::text, 1, 1))) || lower("substring"((actor.last_name)::text, 2)))) AS actors - FROM ((((category - LEFT JOIN film_category ON ((category.category_id = film_category.category_id))) - LEFT JOIN film ON ((film_category.film_id = film.film_id))) - JOIN film_actor ON ((film.film_id = film_actor.film_id))) - JOIN actor ON ((film_actor.actor_id = actor.actor_id))) - GROUP BY film.film_id, film.title, film.description, category.name, film.rental_rate, film.length, film.rating; """), where); } @@ -207,7 +188,7 @@ public class NicerButSlowerFilmList extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private Payment(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Payment(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Payment(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Payment(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -245,7 +241,7 @@ public class Payment extends TableImpl { */ @Override public Payment where(Condition condition) { - return new Payment(getQualifiedName(), aliased() ? this : null, condition); + return new Payment(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java index 8ec2581cb1..b891ccff08 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java @@ -99,15 +99,11 @@ public class PaymentP2007_01 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_01(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_01(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_01(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_01(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_01 extends TableImpl { */ @Override public PaymentP2007_01 where(Condition condition) { - return new PaymentP2007_01(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_01(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java index 207f804562..669a7ea82f 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java @@ -99,15 +99,11 @@ public class PaymentP2007_02 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_02(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_02(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_02(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_02(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_02 extends TableImpl { */ @Override public PaymentP2007_02 where(Condition condition) { - return new PaymentP2007_02(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_02(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java index e49bb97de3..6916001ff5 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java @@ -99,15 +99,11 @@ public class PaymentP2007_03 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_03(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_03(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_03(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_03(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_03 extends TableImpl { */ @Override public PaymentP2007_03 where(Condition condition) { - return new PaymentP2007_03(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_03(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java index 8f44a280c1..3b5e4bc471 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java @@ -99,15 +99,11 @@ public class PaymentP2007_04 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_04(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_04(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_04(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_04(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_04 extends TableImpl { */ @Override public PaymentP2007_04 where(Condition condition) { - return new PaymentP2007_04(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_04(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java index 276161f5d5..63866bbf9b 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java @@ -99,15 +99,11 @@ public class PaymentP2007_05 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_05(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_05(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_05(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_05(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_05 extends TableImpl { */ @Override public PaymentP2007_05 where(Condition condition) { - return new PaymentP2007_05(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_05(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java index 5c30533460..abe7307e9e 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java @@ -99,15 +99,11 @@ public class PaymentP2007_06 extends TableImpl { public final TableField PAYMENT_DATE = createField(DSL.name("payment_date"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); private PaymentP2007_06(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private PaymentP2007_06(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private PaymentP2007_06(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private PaymentP2007_06(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -248,7 +244,7 @@ public class PaymentP2007_06 extends TableImpl { */ @Override public PaymentP2007_06 where(Condition condition) { - return new PaymentP2007_06(getQualifiedName(), aliased() ? this : null, condition); + return new PaymentP2007_06(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java index 2a84d76f59..370cbab1f3 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java @@ -109,15 +109,11 @@ public class Rental extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Rental(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Rental(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Rental(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Rental(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -347,7 +343,7 @@ public class Rental extends TableImpl { */ @Override public Rental where(Condition condition) { - return new Rental(getQualifiedName(), aliased() ? this : null, condition); + return new Rental(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/RewardsReport.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/RewardsReport.java index 25122fa7fc..0c96cd2894 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/RewardsReport.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/RewardsReport.java @@ -9,6 +9,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.util.function.Function; +import org.jooq.Condition; import org.jooq.Field; import org.jooq.Function10; import org.jooq.Identity; @@ -106,7 +107,11 @@ public class RewardsReport extends TableImpl { } private RewardsReport(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function()); + this(alias, aliased, parameters, null); + } + + private RewardsReport(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.function(), where); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByFilmCategory.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByFilmCategory.java index ada323a4b1..707263bae0 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByFilmCategory.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByFilmCategory.java @@ -63,10 +63,10 @@ public class SalesByFilmCategory extends TableImpl { public final TableField TOTAL_SALES = createField(DSL.name("total_sales"), SQLDataType.NUMERIC, this, ""); private SalesByFilmCategory(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private SalesByFilmCategory(Name alias, Table aliased, Field[] parameters) { + private SalesByFilmCategory(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "sales_by_film_category" as SELECT c.name AS category, sum(p.amount) AS total_sales @@ -78,21 +78,6 @@ public class SalesByFilmCategory extends TableImpl { JOIN category c ON ((fc.category_id = c.category_id))) GROUP BY c.name ORDER BY (sum(p.amount)) DESC; - """)); - } - - private SalesByFilmCategory(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "sales_by_film_category" as SELECT c.name AS category, - sum(p.amount) AS total_sales - FROM (((((payment p - JOIN rental r ON ((p.rental_id = r.rental_id))) - JOIN inventory i ON ((r.inventory_id = i.inventory_id))) - JOIN film f ON ((i.film_id = f.film_id))) - JOIN film_category fc ON ((f.film_id = fc.film_id))) - JOIN category c ON ((fc.category_id = c.category_id))) - GROUP BY c.name - ORDER BY (sum(p.amount)) DESC; """), where); } @@ -168,7 +153,7 @@ public class SalesByFilmCategory extends TableImpl { */ @Override public SalesByFilmCategory where(Condition condition) { - return new SalesByFilmCategory(getQualifiedName(), aliased() ? this : null, condition); + return new SalesByFilmCategory(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByStore.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByStore.java index d61f95a904..19aaa9c7be 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByStore.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/SalesByStore.java @@ -68,10 +68,10 @@ public class SalesByStore extends TableImpl { public final TableField TOTAL_SALES = createField(DSL.name("total_sales"), SQLDataType.NUMERIC, this, ""); private SalesByStore(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private SalesByStore(Name alias, Table aliased, Field[] parameters) { + private SalesByStore(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" create view "sales_by_store" as SELECT (((c.city)::text || ','::text) || (cy.country)::text) AS store, (((m.first_name)::text || ' '::text) || (m.last_name)::text) AS manager, @@ -86,24 +86,6 @@ public class SalesByStore extends TableImpl { JOIN staff m ON ((s.manager_staff_id = m.staff_id))) GROUP BY cy.country, c.city, s.store_id, m.first_name, m.last_name ORDER BY cy.country, c.city; - """)); - } - - private SalesByStore(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" - create view "sales_by_store" as SELECT (((c.city)::text || ','::text) || (cy.country)::text) AS store, - (((m.first_name)::text || ' '::text) || (m.last_name)::text) AS manager, - sum(p.amount) AS total_sales - FROM (((((((payment p - JOIN rental r ON ((p.rental_id = r.rental_id))) - JOIN inventory i ON ((r.inventory_id = i.inventory_id))) - JOIN store s ON ((i.store_id = s.store_id))) - JOIN address a ON ((s.address_id = a.address_id))) - JOIN city c ON ((a.city_id = c.city_id))) - JOIN country cy ON ((c.country_id = cy.country_id))) - JOIN staff m ON ((s.manager_staff_id = m.staff_id))) - GROUP BY cy.country, c.city, s.store_id, m.first_name, m.last_name - ORDER BY cy.country, c.city; """), where); } @@ -177,7 +159,7 @@ public class SalesByStore extends TableImpl { */ @Override public SalesByStore where(Condition condition) { - return new SalesByStore(getQualifiedName(), aliased() ? this : null, condition); + return new SalesByStore(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java index 48f0c336d3..b28c218930 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java @@ -127,15 +127,11 @@ public class Staff extends TableImpl { public final TableField PICTURE = createField(DSL.name("picture"), SQLDataType.BLOB, this, ""); private Staff(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Staff(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Staff(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Staff(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -361,7 +357,7 @@ public class Staff extends TableImpl { */ @Override public Staff where(Condition condition) { - return new Staff(getQualifiedName(), aliased() ? this : null, condition); + return new Staff(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/StaffList.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/StaffList.java index e9c0f0f5f8..564258612c 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/StaffList.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/StaffList.java @@ -92,28 +92,11 @@ public class StaffList extends TableImpl { public final TableField SID = createField(DSL.name("sid"), SQLDataType.BIGINT, this, ""); private StaffList(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private StaffList(Name alias, Table aliased, Field[] parameters) { + private StaffList(Name alias, Table aliased, Field[] parameters, Condition where) { super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view(""" - create view "staff_list" as SELECT s.staff_id AS id, - (((s.first_name)::text || ' '::text) || (s.last_name)::text) AS name, - a.address, - a.postal_code AS "zip code", - a.phone, - city.city, - country.country, - s.store_id AS sid - FROM (((staff s - JOIN address a ON ((s.address_id = a.address_id))) - JOIN city ON ((a.city_id = city.city_id))) - JOIN country ON ((city.country_id = country.country_id))); - """)); - } - - private StaffList(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.view(""" create view "staff_list" as SELECT s.staff_id AS id, (((s.first_name)::text || ' '::text) || (s.last_name)::text) AS name, a.address, @@ -199,7 +182,7 @@ public class StaffList extends TableImpl { */ @Override public StaffList where(Condition condition) { - return new StaffList(getQualifiedName(), aliased() ? this : null, condition); + return new StaffList(getQualifiedName(), aliased() ? this : null, null, condition); } /** diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java index 8085e59ab3..945f02da58 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java @@ -88,15 +88,11 @@ public class Store extends TableImpl { public final TableField LAST_UPDATE = createField(DSL.name("last_update"), SQLDataType.LOCALDATETIME(6).nullable(false).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private Store(Name alias, Table aliased) { - this(alias, aliased, (Field[]) null); + this(alias, aliased, (Field[]) null, null); } - private Store(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); - } - - private Store(Name alias, Table aliased, Condition where) { - super(alias, null, aliased, null, DSL.comment(""), TableOptions.table(), where); + private Store(Name alias, Table aliased, Field[] parameters, Condition where) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where); } /** @@ -249,7 +245,7 @@ public class Store extends TableImpl { */ @Override public Store where(Condition condition) { - return new Store(getQualifiedName(), aliased() ? this : null, condition); + return new Store(getQualifiedName(), aliased() ? this : null, null, condition); } /** From 3cd2dd559aed94f2f4a1bbe82cb3fdee4041fc70 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 24 May 2023 11:24:00 +0200 Subject: [PATCH 2/4] [jOOQ/jOOQ#15097] Compilation error in Oracle generated code for package type in PL/SQL RECORD constructor --- .../java/org/jooq/codegen/JavaGenerator.java | 66 ++++++++++--------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java index d11e7f35d6..9fbbf7bf2d 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java @@ -2255,6 +2255,8 @@ public class JavaGenerator extends AbstractGenerator { final boolean isUDT = t.getType(r).isUDT(); final boolean isArray = t.getType(r).isArray(); final boolean isUDTArray = t.getType(r).isUDTArray(); + final ArrayDefinition array = database.getArray(t.getType(r).getSchema(), t.getType(r).getQualifiedUserType()); + final String indexTypeFull = array == null || array.getIndexType() == null ? null : getJavaType(array.getIndexType(resolver(out)), out); final boolean isArrayOfUDTs = isArrayOfUDTs(t, r); final String udtType = (isUDT || isArray) @@ -2333,15 +2335,21 @@ public class JavaGenerator extends AbstractGenerator { else { if (pojoArgument) { if (isUDTArray) { - out.println("%s(value.%s() == null ? null : new %s(value.%s().stream().map(%s::new).collect(%s.toList())));", - getStrategy().getJavaSetterName(column, Mode.RECORD), - getStrategy().getJavaGetterName(column, Mode.POJO), - udtType, - generatePojosAsJavaRecordClasses() - ? getStrategy().getJavaMemberName(column, Mode.POJO) - : getStrategy().getJavaGetterName(column, Mode.POJO), - udtArrayElementType, - Collectors.class); + if (indexTypeFull == null) { + out.println("%s(value.%s() == null ? null : new %s(value.%s().stream().map(%s::new).collect(%s.toList())));", + getStrategy().getJavaSetterName(column, Mode.RECORD), + getStrategy().getJavaGetterName(column, Mode.POJO), + udtType, + generatePojosAsJavaRecordClasses() + ? getStrategy().getJavaMemberName(column, Mode.POJO) + : getStrategy().getJavaGetterName(column, Mode.POJO), + udtArrayElementType, + Collectors.class); + } + else { + out.println("if (true)"); + out.println("throw new %s(\"Cannot use POJO constructor for POJO that references Oracle associative array yet. See https://github.com/jOOQ/jOOQ/issues/15108 for details.\");", UnsupportedOperationException.class); + } } else if (isArrayOfUDTs) { final String columnTypeFull = getJavaType(t.getType(resolver(out, Mode.POJO)), out, Mode.POJO); @@ -6329,33 +6337,29 @@ public class JavaGenerator extends AbstractGenerator { out.println("});"); } else - out.println("this(alias, aliased, (%s[]) null);", Field.class); + out.println("this(alias, aliased, (%s[]) null, null);", Field.class); out.println("}"); - out.println(); - out.println("private %s(%s alias, %s<%s> aliased, %s[] parameters) {", className, Name.class, Table.class, recordType, Field.class); - - if ((generateSourcesOnViews() || table.isSynthetic()) && table.isView() && table.getSource() != null) - out.println("super(alias, null, aliased, parameters, %s.comment(\"%s\"), %s.%s(%s));", DSL.class, escapeString(comment(table)), TableOptions.class, tableType, textBlock(table.getSource())); - else if (table.isSynthetic() && table.isTableValuedFunction() && table.getSource() != null) - out.println("super(alias, null, aliased, parameters, %s.comment(\"%s\"), %s.%s(%s));", DSL.class, escapeString(comment(table)), TableOptions.class, tableType, textBlock(table.getSource())); - else - out.println("super(alias, null, aliased, parameters, %s.comment(\"%s\"), %s.%s());", DSL.class, escapeString(comment(table)), TableOptions.class, tableType); - - out.println("}"); - - if (generateWhereMethodOverrides() && !table.isTableValuedFunction()) { + if (table.isTableValuedFunction()) { out.println(); - out.println("private %s(%s alias, %s<%s> aliased, %s where) {", className, Name.class, Table.class, recordType, Condition.class); - - if ((generateSourcesOnViews() || table.isSynthetic()) && table.isView() && table.getSource() != null) - out.println("super(alias, null, aliased, null, %s.comment(\"%s\"), %s.%s(%s), where);", DSL.class, escapeString(comment(table)), TableOptions.class, tableType, textBlock(table.getSource())); - else - out.println("super(alias, null, aliased, null, %s.comment(\"%s\"), %s.%s(), where);", DSL.class, escapeString(comment(table)), TableOptions.class, tableType); - + out.println("private %s(%s alias, %s<%s> aliased, %s[] parameters) {", className, Name.class, Table.class, recordType, Field.class); + out.println("this(alias, aliased, parameters, null);"); out.println("}"); } + + out.println(); + out.println("private %s(%s alias, %s<%s> aliased, %s[] parameters, %s where) {", className, Name.class, Table.class, recordType, Field.class, Condition.class); + + + if ((generateSourcesOnViews() || table.isSynthetic()) && table.isView() && table.getSource() != null) + out.println("super(alias, null, aliased, parameters, %s.comment(\"%s\"), %s.%s(%s), where);", DSL.class, escapeString(comment(table)), TableOptions.class, tableType, textBlock(table.getSource())); + else if (table.isSynthetic() && table.isTableValuedFunction() && table.getSource() != null) + out.println("super(alias, null, aliased, parameters, %s.comment(\"%s\"), %s.%s(%s), where);", DSL.class, escapeString(comment(table)), TableOptions.class, tableType, textBlock(table.getSource())); + else + out.println("super(alias, null, aliased, parameters, %s.comment(\"%s\"), %s.%s(), where);", DSL.class, escapeString(comment(table)), TableOptions.class, tableType); + + out.println("}"); } if (scala) { @@ -7227,7 +7231,7 @@ public class JavaGenerator extends AbstractGenerator { idt.accept(() -> { out.println("%s%s where(%s condition) {", visibilityPublic(), className, Condition.class); - out.println("return new %s(getQualifiedName(), aliased() ? this : null, condition);", className); + out.println("return new %s(getQualifiedName(), aliased() ? this : null, null, condition);", className); out.println("}"); }); idt.accept(() -> { From f6545c6fe63f51aaa2a33ad495f0c501709e59ca Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 24 May 2023 12:57:40 +0200 Subject: [PATCH 3/4] [jOOQ/jOOQ#15114] Upgrade sqlite dependency to 3.42.0.0 to mitigate CVE-2023-32697 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index af281069b4..943d70a792 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ 2.1.214 - 3.39.4.1 + 3.42.0.0 0.7.1 10.14.2.0 2.7.1 From 04216a1bf3d2871580266a427e2e07bd1c6106f4 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 24 May 2023 17:32:15 +0200 Subject: [PATCH 4/4] [jOOQ/jOOQ#14306] Avoid second ExecuteContext for native implementations of RETURNING --- .../main/java/org/jooq/impl/AbstractDMLQuery.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractDMLQuery.java b/jOOQ/src/main/java/org/jooq/impl/AbstractDMLQuery.java index 17eda38242..e6532bcc85 100644 --- a/jOOQ/src/main/java/org/jooq/impl/AbstractDMLQuery.java +++ b/jOOQ/src/main/java/org/jooq/impl/AbstractDMLQuery.java @@ -1225,11 +1225,7 @@ abstract class AbstractDMLQuery extends AbstractRowCountQuery } } - ExecuteContext ctx2 = new DefaultExecuteContext(((DefaultExecuteContext) ctx).originalConfiguration()); - ExecuteListener listener2 = ExecuteListeners.getAndStart(ctx2); - - ctx2.resultSet(rs); - returnedResult = new CursorImpl<>(ctx2, listener2, returningResolvedAsterisks.toArray(EMPTY_FIELD), null, false, true).fetch(); + returnedResult = new CursorImpl<>(ctx, listener, returningResolvedAsterisks.toArray(EMPTY_FIELD), null, false, true).fetch(); // [#5366] HSQLDB currently doesn't support fetching updated records in UPDATE statements. // [#5408] Other dialects may fall through the switch above (PostgreSQL, Firebird, Oracle) and must @@ -1252,9 +1248,9 @@ abstract class AbstractDMLQuery extends AbstractRowCountQuery listener.executeStart(ctx); int result = executeImmediate(ctx.statement()).executeUpdate(); ctx.rows(result); + ctx.resultSet(ctx.statement().getGeneratedKeys()); listener.executeEnd(ctx); - - return ctx.statement().getGeneratedKeys(); + return ctx.resultSet(); } private final int executeReturningGeneratedKeysFetchAdditionalRows(ExecuteContext ctx, ExecuteListener listener) throws SQLException { @@ -1303,10 +1299,10 @@ abstract class AbstractDMLQuery extends AbstractRowCountQuery private final ResultSet executeReturningQuery(ExecuteContext ctx, ExecuteListener listener) throws SQLException { listener.executeStart(ctx); - ResultSet rs = ctx.statement().executeQuery(); + ctx.resultSet(ctx.statement().executeQuery()); listener.executeEnd(ctx); - return rs; + return ctx.resultSet(); } /**