diff --git a/jOOQ-examples/jOOQ-r2dbc-example/.gitignore b/jOOQ-examples/jOOQ-r2dbc-example/.gitignore
new file mode 100644
index 0000000000..19f2e002ce
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/.gitignore
@@ -0,0 +1,2 @@
+/target
+/target
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/LICENSE.txt b/jOOQ-examples/jOOQ-r2dbc-example/LICENSE.txt
new file mode 100644
index 0000000000..d090694f44
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/LICENSE.txt
@@ -0,0 +1,19 @@
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Other licenses:
+-----------------------------------------------------------------------------
+Commercial licenses for this work are available. These replace the above
+ASL 2.0 and offer limited warranties, support, maintenance, and commercial
+database integrations.
+
+For more information, please visit: http://www.jooq.org/licenses
\ No newline at end of file
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/README.md b/jOOQ-examples/jOOQ-r2dbc-example/README.md
new file mode 100644
index 0000000000..2cdeb22ac1
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/README.md
@@ -0,0 +1,32 @@
+Thanks for downloading jOOQ.
+Please visit http://www.jooq.org for more information.
+
+### Description
+
+This example uses
+
+1. [Flyway](https://flywaydb.org/) for database installation
+2. [Spark Java](http://sparkjava.com/) as a web server
+3. [chart.js](http://www.chartjs.org/) as an HTML5 charting library
+4. [jOOQ](http://www.jooq.org) for reporting
+
+The whole thing then looks like this:
+
+
+
+### Installation
+
+To install and run this example, simply check it out and follow these steps
+
+1. Create a "Sakila" database on your PostgreSQL instance
+2. Edit src/main/resources/config.properties and configure your database instance
+2. Run the following commands
+
+```
+$ pwd
+/path/to/checkout/dir
+$ cd jOOQ-examples/jOOQ-spark-chart-example
+...
+$ mvn clean install
+...
+```
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/pom.xml b/jOOQ-examples/jOOQ-r2dbc-example/pom.xml
new file mode 100644
index 0000000000..99cb068dc7
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/pom.xml
@@ -0,0 +1,101 @@
+
+
+ 4.0.0
+
+
+ org.jooq
+ jooq-examples
+ 3.16.0-SNAPSHOT
+
+
+ jooq-r2dbc-example
+
+
+ 2.11.2
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 11
+
+
+
+ 11
+ 11
+
+
+
+
+ org.jooq
+ jooq-codegen-maven
+
+
+
+ generate-postgres
+ generate-sources
+
+ generate
+
+
+
+
+ org.jooq.meta.extensions.ddl.DDLDatabase
+
+
+ scripts
+ ${basedir}/src/main/resources/db.sql
+
+
+ R2DBC_EXAMPLE
+
+
+ org.jooq.example.r2dbc.db
+ src/main/java
+
+
+
+
+
+
+
+
+
+
+
+ org.jooq
+ jooq
+
+
+ org.jooq
+ jooq-meta-extensions
+
+
+ io.r2dbc
+ r2dbc-h2
+ 0.8.4.RELEASE
+
+
+ org.apache.logging.log4j
+ log4j-slf4j18-impl
+ ${log4j.version}
+
+
+ org.apache.logging.log4j
+ log4j-core
+ ${log4j.version}
+
+
+ junit
+ junit
+ 4.13.1
+ test
+
+
+
\ No newline at end of file
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/DefaultCatalog.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/DefaultCatalog.java
new file mode 100644
index 0000000000..22ab88c82a
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/DefaultCatalog.java
@@ -0,0 +1,45 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db;
+
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Schema;
+import org.jooq.impl.CatalogImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class DefaultCatalog extends CatalogImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of DEFAULT_CATALOG
+ */
+ public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
+
+ /**
+ * The schema R2DBC_EXAMPLE.
+ */
+ public final R2dbcExample R2DBC_EXAMPLE = R2dbcExample.R2DBC_EXAMPLE;
+
+ /**
+ * No further instances allowed
+ */
+ private DefaultCatalog() {
+ super("");
+ }
+
+ @Override
+ public final List getSchemas() {
+ return Arrays.asList(
+ R2dbcExample.R2DBC_EXAMPLE
+ );
+ }
+}
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/Keys.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/Keys.java
new file mode 100644
index 0000000000..c616339ca4
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/Keys.java
@@ -0,0 +1,37 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db;
+
+
+import org.jooq.ForeignKey;
+import org.jooq.TableField;
+import org.jooq.UniqueKey;
+import org.jooq.example.r2dbc.db.tables.Author;
+import org.jooq.example.r2dbc.db.tables.Book;
+import org.jooq.example.r2dbc.db.tables.records.AuthorRecord;
+import org.jooq.example.r2dbc.db.tables.records.BookRecord;
+import org.jooq.impl.DSL;
+import org.jooq.impl.Internal;
+
+
+/**
+ * A class modelling foreign key relationships and constraints of tables in
+ * R2DBC_EXAMPLE.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Keys {
+
+ // -------------------------------------------------------------------------
+ // UNIQUE and PRIMARY KEY definitions
+ // -------------------------------------------------------------------------
+
+ public static final UniqueKey PK_AUTHOR = Internal.createUniqueKey(Author.AUTHOR, DSL.name("PK_AUTHOR"), new TableField[] { Author.AUTHOR.ID }, true);
+ public static final UniqueKey PK_BOOK = Internal.createUniqueKey(Book.BOOK, DSL.name("PK_BOOK"), new TableField[] { Book.BOOK.ID }, true);
+
+ // -------------------------------------------------------------------------
+ // FOREIGN KEY definitions
+ // -------------------------------------------------------------------------
+
+ public static final ForeignKey FK_BOOK_AUTHOR = Internal.createForeignKey(Book.BOOK, DSL.name("FK_BOOK_AUTHOR"), new TableField[] { Book.BOOK.ID }, Keys.PK_AUTHOR, new TableField[] { Author.AUTHOR.ID }, true);
+}
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/R2dbcExample.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/R2dbcExample.java
new file mode 100644
index 0000000000..eb01953507
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/R2dbcExample.java
@@ -0,0 +1,60 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db;
+
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Catalog;
+import org.jooq.Table;
+import org.jooq.example.r2dbc.db.tables.Author;
+import org.jooq.example.r2dbc.db.tables.Book;
+import org.jooq.impl.SchemaImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class R2dbcExample extends SchemaImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of R2DBC_EXAMPLE
+ */
+ public static final R2dbcExample R2DBC_EXAMPLE = new R2dbcExample();
+
+ /**
+ * The table R2DBC_EXAMPLE.AUTHOR.
+ */
+ public final Author AUTHOR = Author.AUTHOR;
+
+ /**
+ * The table R2DBC_EXAMPLE.BOOK.
+ */
+ public final Book BOOK = Book.BOOK;
+
+ /**
+ * No further instances allowed
+ */
+ private R2dbcExample() {
+ super("R2DBC_EXAMPLE", null);
+ }
+
+
+ @Override
+ public Catalog getCatalog() {
+ return DefaultCatalog.DEFAULT_CATALOG;
+ }
+
+ @Override
+ public final List> getTables() {
+ return Arrays.asList(
+ Author.AUTHOR,
+ Book.BOOK
+ );
+ }
+}
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/Tables.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/Tables.java
new file mode 100644
index 0000000000..6cf3486962
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/Tables.java
@@ -0,0 +1,26 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db;
+
+
+import org.jooq.example.r2dbc.db.tables.Author;
+import org.jooq.example.r2dbc.db.tables.Book;
+
+
+/**
+ * Convenience access to all tables in R2DBC_EXAMPLE.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Tables {
+
+ /**
+ * The table R2DBC_EXAMPLE.AUTHOR.
+ */
+ public static final Author AUTHOR = Author.AUTHOR;
+
+ /**
+ * The table R2DBC_EXAMPLE.BOOK.
+ */
+ public static final Book BOOK = Book.BOOK;
+}
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
new file mode 100644
index 0000000000..d080927f33
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java
@@ -0,0 +1,144 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db.tables;
+
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row3;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.TableOptions;
+import org.jooq.UniqueKey;
+import org.jooq.example.r2dbc.db.Keys;
+import org.jooq.example.r2dbc.db.R2dbcExample;
+import org.jooq.example.r2dbc.db.tables.records.AuthorRecord;
+import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
+import org.jooq.impl.TableImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Author extends TableImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of R2DBC_EXAMPLE.AUTHOR
+ */
+ public static final Author AUTHOR = new Author();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return AuthorRecord.class;
+ }
+
+ /**
+ * The column R2DBC_EXAMPLE.AUTHOR.ID.
+ */
+ public final TableField ID = createField(DSL.name("ID"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
+
+ /**
+ * The column R2DBC_EXAMPLE.AUTHOR.FIRST_NAME.
+ */
+ public final TableField FIRST_NAME = createField(DSL.name("FIRST_NAME"), SQLDataType.VARCHAR(100).nullable(false), this, "");
+
+ /**
+ * The column R2DBC_EXAMPLE.AUTHOR.LAST_NAME.
+ */
+ 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, null);
+ }
+
+ private Author(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
+ }
+
+ /**
+ * Create an aliased R2DBC_EXAMPLE.AUTHOR table reference
+ */
+ public Author(String alias) {
+ this(DSL.name(alias), AUTHOR);
+ }
+
+ /**
+ * Create an aliased R2DBC_EXAMPLE.AUTHOR table reference
+ */
+ public Author(Name alias) {
+ this(alias, AUTHOR);
+ }
+
+ /**
+ * Create a R2DBC_EXAMPLE.AUTHOR table reference
+ */
+ public Author() {
+ this(DSL.name("AUTHOR"), null);
+ }
+
+ public Author(Table child, ForeignKey key) {
+ super(child, key, AUTHOR);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : R2dbcExample.R2DBC_EXAMPLE;
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return (Identity) super.getIdentity();
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.PK_AUTHOR;
+ }
+
+ @Override
+ public Author as(String alias) {
+ return new Author(DSL.name(alias), this);
+ }
+
+ @Override
+ public Author as(Name alias) {
+ return new Author(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Author rename(String name) {
+ return new Author(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Author rename(Name name) {
+ return new Author(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row3 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+}
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
new file mode 100644
index 0000000000..7e5f00f0d4
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java
@@ -0,0 +1,161 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db.tables;
+
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Identity;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Row3;
+import org.jooq.Schema;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.TableOptions;
+import org.jooq.UniqueKey;
+import org.jooq.example.r2dbc.db.Keys;
+import org.jooq.example.r2dbc.db.R2dbcExample;
+import org.jooq.example.r2dbc.db.tables.records.BookRecord;
+import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
+import org.jooq.impl.TableImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class Book extends TableImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of R2DBC_EXAMPLE.BOOK
+ */
+ public static final Book BOOK = new Book();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return BookRecord.class;
+ }
+
+ /**
+ * The column R2DBC_EXAMPLE.BOOK.ID.
+ */
+ public final TableField ID = createField(DSL.name("ID"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
+
+ /**
+ * The column R2DBC_EXAMPLE.BOOK.AUTHOR_ID.
+ */
+ public final TableField AUTHOR_ID = createField(DSL.name("AUTHOR_ID"), SQLDataType.INTEGER.nullable(false), this, "");
+
+ /**
+ * The column R2DBC_EXAMPLE.BOOK.TITLE.
+ */
+ public final TableField TITLE = createField(DSL.name("TITLE"), SQLDataType.VARCHAR(100).nullable(false), this, "");
+
+ private Book(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private Book(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
+ }
+
+ /**
+ * Create an aliased R2DBC_EXAMPLE.BOOK table reference
+ */
+ public Book(String alias) {
+ this(DSL.name(alias), BOOK);
+ }
+
+ /**
+ * Create an aliased R2DBC_EXAMPLE.BOOK table reference
+ */
+ public Book(Name alias) {
+ this(alias, BOOK);
+ }
+
+ /**
+ * Create a R2DBC_EXAMPLE.BOOK table reference
+ */
+ public Book() {
+ this(DSL.name("BOOK"), null);
+ }
+
+ public Book(Table child, ForeignKey key) {
+ super(child, key, BOOK);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : R2dbcExample.R2DBC_EXAMPLE;
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return (Identity) super.getIdentity();
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.PK_BOOK;
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.asList(Keys.FK_BOOK_AUTHOR);
+ }
+
+ private transient Author _author;
+
+ public Author author() {
+ if (_author == null)
+ _author = new Author(this, Keys.FK_BOOK_AUTHOR);
+
+ return _author;
+ }
+
+ @Override
+ public Book as(String alias) {
+ return new Book(DSL.name(alias), this);
+ }
+
+ @Override
+ public Book as(Name alias) {
+ return new Book(alias, this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Book rename(String name) {
+ return new Book(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Book rename(Name name) {
+ return new Book(name, null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row3 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+}
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/records/AuthorRecord.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/records/AuthorRecord.java
new file mode 100644
index 0000000000..b90b51a35a
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/records/AuthorRecord.java
@@ -0,0 +1,180 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db.tables.records;
+
+
+import org.jooq.Field;
+import org.jooq.Record1;
+import org.jooq.Record3;
+import org.jooq.Row3;
+import org.jooq.example.r2dbc.db.tables.Author;
+import org.jooq.impl.UpdatableRecordImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class AuthorRecord extends UpdatableRecordImpl implements Record3 {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Setter for R2DBC_EXAMPLE.AUTHOR.ID.
+ */
+ public void setId(Integer value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for R2DBC_EXAMPLE.AUTHOR.ID.
+ */
+ public Integer getId() {
+ return (Integer) get(0);
+ }
+
+ /**
+ * Setter for R2DBC_EXAMPLE.AUTHOR.FIRST_NAME.
+ */
+ public void setFirstName(String value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for R2DBC_EXAMPLE.AUTHOR.FIRST_NAME.
+ */
+ public String getFirstName() {
+ return (String) get(1);
+ }
+
+ /**
+ * Setter for R2DBC_EXAMPLE.AUTHOR.LAST_NAME.
+ */
+ public void setLastName(String value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for R2DBC_EXAMPLE.AUTHOR.LAST_NAME.
+ */
+ public String getLastName() {
+ return (String) get(2);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record3 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+
+ @Override
+ public Row3 valuesRow() {
+ return (Row3) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return Author.AUTHOR.ID;
+ }
+
+ @Override
+ public Field field2() {
+ return Author.AUTHOR.FIRST_NAME;
+ }
+
+ @Override
+ public Field field3() {
+ return Author.AUTHOR.LAST_NAME;
+ }
+
+ @Override
+ public Integer component1() {
+ return getId();
+ }
+
+ @Override
+ public String component2() {
+ return getFirstName();
+ }
+
+ @Override
+ public String component3() {
+ return getLastName();
+ }
+
+ @Override
+ public Integer value1() {
+ return getId();
+ }
+
+ @Override
+ public String value2() {
+ return getFirstName();
+ }
+
+ @Override
+ public String value3() {
+ return getLastName();
+ }
+
+ @Override
+ public AuthorRecord value1(Integer value) {
+ setId(value);
+ return this;
+ }
+
+ @Override
+ public AuthorRecord value2(String value) {
+ setFirstName(value);
+ return this;
+ }
+
+ @Override
+ public AuthorRecord value3(String value) {
+ setLastName(value);
+ return this;
+ }
+
+ @Override
+ public AuthorRecord values(Integer value1, String value2, String value3) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached AuthorRecord
+ */
+ public AuthorRecord() {
+ super(Author.AUTHOR);
+ }
+
+ /**
+ * Create a detached, initialised AuthorRecord
+ */
+ public AuthorRecord(Integer id, String firstName, String lastName) {
+ super(Author.AUTHOR);
+
+ setId(id);
+ setFirstName(firstName);
+ setLastName(lastName);
+ }
+}
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/records/BookRecord.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/records/BookRecord.java
new file mode 100644
index 0000000000..f259550a12
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/records/BookRecord.java
@@ -0,0 +1,180 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package org.jooq.example.r2dbc.db.tables.records;
+
+
+import org.jooq.Field;
+import org.jooq.Record1;
+import org.jooq.Record3;
+import org.jooq.Row3;
+import org.jooq.example.r2dbc.db.tables.Book;
+import org.jooq.impl.UpdatableRecordImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class BookRecord extends UpdatableRecordImpl implements Record3 {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Setter for R2DBC_EXAMPLE.BOOK.ID.
+ */
+ public void setId(Integer value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for R2DBC_EXAMPLE.BOOK.ID.
+ */
+ public Integer getId() {
+ return (Integer) get(0);
+ }
+
+ /**
+ * Setter for R2DBC_EXAMPLE.BOOK.AUTHOR_ID.
+ */
+ public void setAuthorId(Integer value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for R2DBC_EXAMPLE.BOOK.AUTHOR_ID.
+ */
+ public Integer getAuthorId() {
+ return (Integer) get(1);
+ }
+
+ /**
+ * Setter for R2DBC_EXAMPLE.BOOK.TITLE.
+ */
+ public void setTitle(String value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for R2DBC_EXAMPLE.BOOK.TITLE.
+ */
+ public String getTitle() {
+ return (String) get(2);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record3 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row3 fieldsRow() {
+ return (Row3) super.fieldsRow();
+ }
+
+ @Override
+ public Row3 valuesRow() {
+ return (Row3) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return Book.BOOK.ID;
+ }
+
+ @Override
+ public Field field2() {
+ return Book.BOOK.AUTHOR_ID;
+ }
+
+ @Override
+ public Field field3() {
+ return Book.BOOK.TITLE;
+ }
+
+ @Override
+ public Integer component1() {
+ return getId();
+ }
+
+ @Override
+ public Integer component2() {
+ return getAuthorId();
+ }
+
+ @Override
+ public String component3() {
+ return getTitle();
+ }
+
+ @Override
+ public Integer value1() {
+ return getId();
+ }
+
+ @Override
+ public Integer value2() {
+ return getAuthorId();
+ }
+
+ @Override
+ public String value3() {
+ return getTitle();
+ }
+
+ @Override
+ public BookRecord value1(Integer value) {
+ setId(value);
+ return this;
+ }
+
+ @Override
+ public BookRecord value2(Integer value) {
+ setAuthorId(value);
+ return this;
+ }
+
+ @Override
+ public BookRecord value3(String value) {
+ setTitle(value);
+ return this;
+ }
+
+ @Override
+ public BookRecord values(Integer value1, Integer value2, String value3) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached BookRecord
+ */
+ public BookRecord() {
+ super(Book.BOOK);
+ }
+
+ /**
+ * Create a detached, initialised BookRecord
+ */
+ public BookRecord(Integer id, Integer authorId, String title) {
+ super(Book.BOOK);
+
+ setId(id);
+ setAuthorId(authorId);
+ setTitle(title);
+ }
+}
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/resources/db.sql b/jOOQ-examples/jOOQ-r2dbc-example/src/main/resources/db.sql
new file mode 100644
index 0000000000..2977777000
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/resources/db.sql
@@ -0,0 +1,19 @@
+DROP SCHEMA IF EXISTS r2dbc_example CASCADE;
+CREATE SCHEMA r2dbc_example;
+
+CREATE TABLE r2dbc_example.author (
+ id INT NOT NULL AUTO_INCREMENT,
+ first_name VARCHAR(100) NOT NULL,
+ last_name VARCHAR(100) NOT NULL,
+
+ CONSTRAINT pk_author PRIMARY KEY (id)
+);
+
+CREATE TABLE r2dbc_example.book (
+ id INT NOT NULL AUTO_INCREMENT,
+ author_id INT NOT NULL,
+ title VARCHAR(100) NOT NULL,
+
+ CONSTRAINT pk_book PRIMARY KEY (id),
+ CONSTRAINT fk_book_author FOREIGN KEY (id) REFERENCES r2dbc_example.author
+);
\ No newline at end of file
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/resources/log4j2.xml b/jOOQ-examples/jOOQ-r2dbc-example/src/main/resources/log4j2.xml
new file mode 100644
index 0000000000..d0e564454c
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/resources/log4j2.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/test/java/org/jooq/example/r2dbc/test/R2dbcTest.java b/jOOQ-examples/jOOQ-r2dbc-example/src/test/java/org/jooq/example/r2dbc/test/R2dbcTest.java
new file mode 100644
index 0000000000..9c3eaed9be
--- /dev/null
+++ b/jOOQ-examples/jOOQ-r2dbc-example/src/test/java/org/jooq/example/r2dbc/test/R2dbcTest.java
@@ -0,0 +1,50 @@
+package org.jooq.example.r2dbc.test;
+
+import static org.jooq.example.r2dbc.db.Tables.AUTHOR;
+import static org.jooq.example.r2dbc.db.Tables.BOOK;
+
+import org.jooq.DSLContext;
+import org.jooq.RowCountQuery;
+import org.jooq.Source;
+import org.jooq.impl.DSL;
+import org.junit.Before;
+import org.junit.Test;
+
+import io.r2dbc.spi.ConnectionFactories;
+import io.r2dbc.spi.ConnectionFactory;
+import io.r2dbc.spi.ConnectionFactoryOptions;
+import reactor.core.publisher.Flux;
+
+public class R2dbcTest {
+
+ DSLContext ctx;
+
+ @Before
+ public void setup() {
+ ConnectionFactory connectionFactory = ConnectionFactories.get(
+ ConnectionFactoryOptions
+ .parse("r2dbc:h2:file://localhost/~/jooq-r2dbc-example")
+ .mutate()
+ .option(ConnectionFactoryOptions.USER, "sa")
+ .option(ConnectionFactoryOptions.PASSWORD, "")
+ .build()
+ );
+
+ ctx = DSL.using(connectionFactory);
+
+ Flux.fromIterable(ctx.parser().parse(Source.of(R2dbcTest.class.getResourceAsStream("/db.sql")).readString()))
+ .ofType(RowCountQuery.class)
+ .flatMap(q -> q)
+ .collectList()
+ .block();
+ }
+
+ @Test
+ public void test() {
+ Flux.from(ctx.insertInto(AUTHOR).columns(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME).values("John", "Doe").returningResult(AUTHOR.ID))
+ .flatMap(id -> ctx.insertInto(BOOK).columns(BOOK.AUTHOR_ID, BOOK.TITLE).values(id.value1(), "Fancy Book"))
+ .thenMany(ctx.select(BOOK.author().FIRST_NAME, BOOK.author().LAST_NAME, BOOK.TITLE).from(BOOK))
+ .doOnNext(System.out::println)
+ .subscribe();
+ }
+}
diff --git a/jOOQ-examples/pom.xml b/jOOQ-examples/pom.xml
index 0f2bef22e3..6957b957d0 100644
--- a/jOOQ-examples/pom.xml
+++ b/jOOQ-examples/pom.xml
@@ -81,6 +81,7 @@
jOOQ-spring-boot-example
jOOQ-jpa-example-entities
jOOQ-jpa-example
+ jOOQ-r2dbc-example
jOOQ-testcontainers-example