summary refs log tree commit diff
path: root/synapse/storage/room.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-01-13 11:07:32 +0000
committerMark Haines <mark.haines@matrix.org>2016-01-13 11:07:32 +0000
commit96e400fee5bf821174730e1421a14e4aa94e3c0d (patch)
tree54a46d0b92ab21bc24487b1170e94a272c7884a7 /synapse/storage/room.py
parentRemove the PushersTable and EventPushActionsTable objects (diff)
downloadsynapse-96e400fee5bf821174730e1421a14e4aa94e3c0d.tar.xz
Remove the RoomsTable object
Diffstat (limited to '')
-rw-r--r--synapse/storage/room.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py
index 390bd78654..dc09a3aaba 100644
--- a/synapse/storage/room.py
+++ b/synapse/storage/room.py
@@ -49,7 +49,7 @@ class RoomStore(SQLBaseStore):
         """
         try:
             yield self._simple_insert(
-                RoomsTable.table_name,
+                "rooms",
                 {
                     "room_id": room_id,
                     "creator": room_creator_user_id,
@@ -70,9 +70,9 @@ class RoomStore(SQLBaseStore):
             A namedtuple containing the room information, or an empty list.
         """
         return self._simple_select_one(
-            table=RoomsTable.table_name,
+            table="rooms",
             keyvalues={"room_id": room_id},
-            retcols=RoomsTable.fields,
+            retcols=("room_id", "is_public", "creator"),
             desc="get_room",
             allow_none=True,
         )
@@ -275,13 +275,3 @@ class RoomStore(SQLBaseStore):
                     aliases.extend(e.content['aliases'])
 
         defer.returnValue((name, aliases))
-
-
-class RoomsTable(object):
-    table_name = "rooms"
-
-    fields = [
-        "room_id",
-        "is_public",
-        "creator"
-    ]