summary refs log tree commit diff
path: root/synapse/storage/databases/main/stream.py
diff options
context:
space:
mode:
authorAnshul Madnawat <100751856+anshulm333@users.noreply.github.com>2023-07-27 00:15:47 +0530
committerGitHub <noreply@github.com>2023-07-26 18:45:47 +0000
commit58f830511486271da72543dd20676b702bc52b2f (patch)
tree49672cd2b4bccc3ffa14f0fd97bf5cd73e23e7c5 /synapse/storage/databases/main/stream.py
parentAdd synapse version as Docker container label (#15972) (diff)
downloadsynapse-58f830511486271da72543dd20676b702bc52b2f.tar.xz
Inline SQL queries using boolean parameters (#15525)
SQLite now supports TRUE and FALSE constants, simplify some
queries by inlining those instead of passing them as arguments.
Diffstat (limited to '')
-rw-r--r--synapse/storage/databases/main/stream.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py
index 92cbe262a6..5a3611c415 100644
--- a/synapse/storage/databases/main/stream.py
+++ b/synapse/storage/databases/main/stream.py
@@ -1401,7 +1401,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
             `to_token`), or `limit` is zero.
         """
 
-        args = [False, room_id]
+        args: List[Any] = [room_id]
 
         order, from_bound, to_bound = generate_pagination_bounds(
             direction, from_token, to_token
@@ -1475,7 +1475,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
                 event.topological_ordering, event.stream_ordering
             FROM events AS event
             %(join_clause)s
-            WHERE event.outlier = ? AND event.room_id = ? AND %(bounds)s
+            WHERE event.outlier = FALSE AND event.room_id = ? AND %(bounds)s
             ORDER BY event.topological_ordering %(order)s,
             event.stream_ordering %(order)s LIMIT ?
         """ % {