From 89bf328a89ec16fb004b202d6e8ee818d2fa967c Mon Sep 17 00:00:00 2001 From: lukaseder Date: Tue, 2 Oct 2018 13:11:57 +0200 Subject: [PATCH] [#7908] Add documentation about UPDATE .. FROM --- .../resources/org/jooq/web/manual-3.10.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.11.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.12.xml | 24 +++++++++++++++++++ .../resources/org/jooq/web/manual-3.3.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.4.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.5.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.6.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.7.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.8.xml | 23 ++++++++++++++++++ .../resources/org/jooq/web/manual-3.9.xml | 23 ++++++++++++++++++ 10 files changed, 231 insertions(+) diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml index fc7739c9e3..94a71d2fe6 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml @@ -6134,6 +6134,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml index 20fbb4e7b8..9dd626c744 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.11.xml @@ -6278,6 +6278,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml index 73e4e05813..9e64d05f2f 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.12.xml @@ -6320,6 +6320,30 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+ +

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml index f6364ee4ba..f3e21425b8 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml @@ -4537,6 +4537,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml index 9ae848ab9c..2e0dbf4f27 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml @@ -5329,6 +5329,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml index b5fb8e77b3..882a13451e 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml @@ -5554,6 +5554,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml index 44c1c71387..8860a0a5b1 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml @@ -5636,6 +5636,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml index f9412a38eb..051a40b5fa 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml @@ -5879,6 +5879,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml index f6016cc39c..096a03205d 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml @@ -6005,6 +6005,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml index c7bd797f04..cb783e9a92 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.9.xml @@ -6086,6 +6086,29 @@ create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) The above row value expressions usages are completely typesafe.

+

UPDATE .. FROM

+ +

+ Some databases, including PostgreSQL and SQL Server, support joining additional tables to an UPDATE statement using a vendor-specific FROM clause. This is supported as well by jOOQ: +

+ + + + + + +

+ In many cases, such a joined update statement can be emulated using a correlated subquery, or using updatable views. +

+

UPDATE .. RETURNING

The Firebird and Postgres databases support a RETURNING clause on their UPDATE statements, similar as the RETURNING clause in . This is useful to fetch trigger-generated values in one go. An example is given here: