summary refs log tree commit diff
path: root/synapse/storage/room.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-01-13 13:45:39 +0100
committerMark Haines <mjark@negativecurvature.net>2016-01-13 13:45:39 +0100
commit37716d55ed78bddb7054b4262275dd5111df6c5c (patch)
tree879daa5a1d430dadc74df56bbf1c97136381b59f /synapse/storage/room.py
parentMerge pull request #483 from matrix-org/erikj/bulk_get_push_rules (diff)
parentMerge remote-tracking branch 'origin/erikj/bulk_get_push_rules' into markjh/t... (diff)
downloadsynapse-37716d55ed78bddb7054b4262275dd5111df6c5c.tar.xz
Merge pull request #482 from matrix-org/markjh/table_name
Finish removing the .*Table objects from the storage layer.
Diffstat (limited to 'synapse/storage/room.py')
-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"
-    ]