diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-15 16:17:36 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-15 16:17:36 +0100 |
commit | d260a42ca279fbca46f85b2c96bddc4f814ecef3 (patch) | |
tree | 41a27d45cdd901555b3e877d45b757848d199f7f /synapse/storage/room.py | |
parent | Comment. (diff) | |
download | synapse-d260a42ca279fbca46f85b2c96bddc4f814ecef3.tar.xz |
PEP8 cleanups
Diffstat (limited to 'synapse/storage/room.py')
-rw-r--r-- | synapse/storage/room.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 8f44b67d8c..22f2dcca45 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -87,19 +87,26 @@ class RoomStore(SQLBaseStore): """ topic_subquery = ( - "SELECT topics.event_id as event_id, topics.room_id as room_id, topic FROM topics " + "SELECT topics.event_id as event_id, " + "topics.room_id as room_id, topic " + "FROM topics " "INNER JOIN current_state_events as c " "ON c.event_id = topics.event_id " ) name_subquery = ( - "SELECT room_names.event_id as event_id, room_names.room_id as room_id, name FROM room_names " + "SELECT room_names.event_id as event_id, " + "room_names.room_id as room_id, name " + "FROM room_names " "INNER JOIN current_state_events as c " "ON c.event_id = room_names.event_id " ) + # We use non printing ascii character US () as a seperator sql = ( - "SELECT r.room_id, n.name, t.topic, group_concat(a.room_alias) FROM rooms AS r " + "SELECT r.room_id, n.name, t.topic, " + "group_concat(a.room_alias, '') " + "FROM rooms AS r " "LEFT JOIN (%(topic)s) AS t ON t.room_id = r.room_id " "LEFT JOIN (%(name)s) AS n ON n.room_id = r.room_id " "INNER JOIN room_aliases AS a ON a.room_id = r.room_id " @@ -117,7 +124,7 @@ class RoomStore(SQLBaseStore): "room_id": r[0], "name": r[1], "topic": r[2], - "aliases": r[3].split(","), + "aliases": r[3].split(""), } for r in rows ] |