summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-10-01 21:38:31 +0100
committerDavid Robertson <davidr@element.io>2022-10-01 21:42:48 +0100
commita71ec5e67c13ae8bc5b9c5db3dd0d56636d3761c (patch)
treeb96da757232d442186d975dd0fba112cfed9f2b2
parentinner_func takes a twisted Connection object (diff)
downloadsynapse-a71ec5e67c13ae8bc5b9c5db3dd0d56636d3761c.tar.xz
Separate runInteraction into simple and advanced
-rw-r--r--synapse/storage/database.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/storage/database.py b/synapse/storage/database.py
index f952cf946c..4ae30a4b4e 100644
--- a/synapse/storage/database.py
+++ b/synapse/storage/database.py
@@ -803,6 +803,22 @@ class DatabasePool:
         desc: str,
         func: Callable[..., R],
         *args: Any,
+        **kwargs: Any,
+    ) -> R:
+        return await self.runInteraction_advanced(
+            desc,
+            func,
+            *args,
+            db_autocommit=False,
+            isolation_level=None,
+            **kwargs,
+        )
+
+    async def runInteraction_advanced(
+        self,
+        desc: str,
+        func: Callable[..., R],
+        *args: Any,
         db_autocommit: bool = False,
         isolation_level: Optional[int] = None,
         **kwargs: Any,