summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-24 15:27:59 +0100
committerErik Johnston <erik@matrix.org>2014-09-24 15:27:59 +0100
commit70899d3ab29cd57301fb135130c940f312bfe482 (patch)
tree69383590001210f59f429ffb88c6afda4c26d789 /synapse/storage/stream.py
parentMake deleting deletes not undelete (diff)
downloadsynapse-70899d3ab29cd57301fb135130c940f312bfe482.tar.xz
Rename deletions to redactions
Diffstat (limited to '')
-rw-r--r--synapse/storage/stream.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index aaac0aae30..91baa18319 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -158,7 +158,7 @@ class StreamStore(SQLBaseStore):
         )
 
         del_sql = (
-            "SELECT event_id FROM deletions WHERE deletes = e.event_id"
+            "SELECT event_id FROM redactions WHERE redacts = e.event_id"
         )
 
         if limit:
@@ -175,14 +175,14 @@ class StreamStore(SQLBaseStore):
             return
 
         sql = (
-            "SELECT *, (%(deleted)s) AS deleted FROM events AS e WHERE "
+            "SELECT *, (%(redacted)s) AS redacted FROM events AS e WHERE "
             "((room_id IN (%(current)s)) OR "
             "(event_id IN (%(invites)s))) "
             "AND e.stream_ordering > ? AND e.stream_ordering <= ? "
             "AND e.outlier = 0 "
             "ORDER BY stream_ordering ASC LIMIT %(limit)d "
         ) % {
-            "deleted": del_sql,
+            "redacted": del_sql,
             "current": current_room_membership_sql,
             "invites": membership_sql,
             "limit": limit
@@ -230,15 +230,15 @@ class StreamStore(SQLBaseStore):
             limit_str = ""
 
         del_sql = (
-            "SELECT event_id FROM deletions WHERE deletes = events.event_id"
+            "SELECT event_id FROM redactions WHERE redacts = events.event_id"
         )
 
         sql = (
-            "SELECT *, (%(deleted)s) AS deleted FROM events "
+            "SELECT *, (%(redacted)s) AS redacted FROM events "
             "WHERE outlier = 0 AND room_id = ? AND %(bounds)s "
             "ORDER BY topological_ordering %(order)s, stream_ordering %(order)s %(limit)s "
         ) % {
-            "deleted": del_sql,
+            "redacted": del_sql,
             "bounds": bounds,
             "order": order,
             "limit": limit_str
@@ -272,15 +272,15 @@ class StreamStore(SQLBaseStore):
         # TODO (erikj): Handle compressed feedback
 
         del_sql = (
-            "SELECT event_id FROM deletions WHERE deletes = events.event_id"
+            "SELECT event_id FROM redactions WHERE redacts = events.event_id"
         )
 
         sql = (
-            "SELECT *, (%(deleted)s) AS deleted FROM events "
+            "SELECT *, (%(redacted)s) AS redacted FROM events "
             "WHERE room_id = ? AND stream_ordering <= ? "
             "ORDER BY topological_ordering DESC, stream_ordering DESC LIMIT ? "
         ) % {
-            "deleted": del_sql,
+            "redacted": del_sql,
         }
 
         rows = yield self._execute_and_decode(