summary refs log tree commit diff
path: root/synapse/storage/room.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-25 17:15:25 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-25 17:15:25 +0000
commit2b8ca84296b228b7cef09244605e4f2760349538 (patch)
tree770c0503383e8f1dbe539252e4d91034f01a6e81 /synapse/storage/room.py
parentAdd stub functions and work out execution flow to implement AS event stream p... (diff)
downloadsynapse-2b8ca84296b228b7cef09244605e4f2760349538.tar.xz
Add support for extracting matching room_ids and room_aliases for a given AS.
Diffstat (limited to '')
-rw-r--r--synapse/storage/room.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py
index 750b17a45f..3a64693404 100644
--- a/synapse/storage/room.py
+++ b/synapse/storage/room.py
@@ -71,6 +71,17 @@ class RoomStore(SQLBaseStore):
             RoomsTable.decode_single_result, query, room_id,
         )
 
+    def get_all_rooms(self):
+        """Retrieve all the rooms.
+
+        Returns:
+            A list of namedtuples containing the room information.
+        """
+        query = RoomsTable.select_statement()
+        return self._execute(
+            RoomsTable.decode_results, query,
+        )
+
     @defer.inlineCallbacks
     def get_rooms(self, is_public):
         """Retrieve a list of all public rooms.