summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-09-23 10:30:03 +0100
committerMark Haines <mark.haines@matrix.org>2015-09-23 10:30:03 +0100
commit1ee3d26432d87ff312350f21da982f646b5af49a (patch)
treede2c541f9d12188d13422d580cce4be8886826fe /synapse
parentsynapse/state.py:_get_state_key_from_event was unused (diff)
downloadsynapse-1ee3d26432d87ff312350f21da982f646b5af49a.tar.xz
synapse/storage/_base.py:_simple_selectupdate_one was unused
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/_base.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index cf4ec30f48..79021bde6b 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -686,37 +686,6 @@ class SQLBaseStore(object):
 
         return dict(zip(retcols, row))
 
-    def _simple_selectupdate_one(self, table, keyvalues, updatevalues=None,
-                                 retcols=None, allow_none=False,
-                                 desc="_simple_selectupdate_one"):
-        """ Combined SELECT then UPDATE."""
-        def func(txn):
-            ret = None
-            if retcols:
-                ret = self._simple_select_one_txn(
-                    txn,
-                    table=table,
-                    keyvalues=keyvalues,
-                    retcols=retcols,
-                    allow_none=allow_none,
-                )
-
-            if updatevalues:
-                self._simple_update_one_txn(
-                    txn,
-                    table=table,
-                    keyvalues=keyvalues,
-                    updatevalues=updatevalues,
-                )
-
-                # if txn.rowcount == 0:
-                #     raise StoreError(404, "No row found")
-                if txn.rowcount > 1:
-                    raise StoreError(500, "More than one row matched")
-
-            return ret
-        return self.runInteraction(desc, func)
-
     def _simple_delete_one(self, table, keyvalues, desc="_simple_delete_one"):
         """Executes a DELETE query on the named table, expecting to delete a
         single row.