From f5c5094d7dbc8ae6efa787211f3cbb03a90d51a4 Mon Sep 17 00:00:00 2001 From: laurenceisla Date: Wed, 21 Jul 2021 19:49:41 -0500 Subject: [PATCH] Add db-tx-end config option --- configuration.rst | 23 ++++++++++++++++++++++- postgrest.dict | 1 + releases/upcoming.rst | 3 +++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/configuration.rst b/configuration.rst index 577d14ae9..b6b9db3d6 100644 --- a/configuration.rst +++ b/configuration.rst @@ -39,6 +39,7 @@ db-anon-role String Y db-pool Int 10 db-pool-timeout Int 10 db-extra-search-path String public +db-tx-end String commit server-host String !4 server-port Int 3000 server-unix-socket String @@ -133,6 +134,27 @@ db-extra-search-path Multiple schemas can be added in a comma-separated string, e.g. ``public, extensions``. +.. _db-tx-end: + +db-tx-end +--------- + + Specifies how to terminate the database transactions. + + .. code:: bash + + # The transaction is always committed + db-tx-end = "commit" + + # The transaction is committed unless a "Prefer: tx=rollback" header is sent + db-tx-end = "commit-allow-override" + + # The transaction is always rolled back + db-tx-end = "rollback" + + # The transaction is rolled back unless a "Prefer: tx=commit" header is sent + db-tx-end = "rollback-allow-override" + .. _server-host: server-host @@ -317,4 +339,3 @@ raw-media-types raw-media-types="image/png, text/xml" - diff --git a/postgrest.dict b/postgrest.dict index 6530644f4..6d86f45b2 100644 --- a/postgrest.dict +++ b/postgrest.dict @@ -142,6 +142,7 @@ todo todos Tsingson tsquery +tx TypeScript UI ui diff --git a/releases/upcoming.rst b/releases/upcoming.rst index 8de3d97b1..4a8f35688 100644 --- a/releases/upcoming.rst +++ b/releases/upcoming.rst @@ -22,6 +22,9 @@ Added * Config option for logging level. See :ref:`log-level`. |br| -- `@steve-chavez `_ +* Config option for specifying how to terminate the transactions (allowing rollbacks, useful for testing). See :ref:`db-tx-end`. + |br| -- `@wolfgangwalther `_ + * Documentation improvements + Added the :ref:`OPTIONS requests ` section.