diff options
author | Erik Johnston <erik@matrix.org> | 2016-05-13 14:43:23 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-05-13 14:43:23 +0100 |
commit | ba5c616ff4398f79a374dfa0a75028e8991c2ab0 (patch) | |
tree | 0c1a9d592ac0279aa773a813b438a9baaee20f0c /synapse/storage/_base.py | |
parent | Merge pull request #769 from matrix-org/erikj/push_actions_delete (diff) | |
parent | Spelling (diff) | |
download | synapse-ba5c616ff4398f79a374dfa0a75028e8991c2ab0.tar.xz |
Merge pull request #778 from matrix-org/erikj/add_pusher
Fixup add_pusher
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 1e27c2c0ce..e0d7098692 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -453,7 +453,9 @@ class SQLBaseStore(object): keyvalues (dict): The unique key tables and their new values values (dict): The nonunique columns and their new values insertion_values (dict): key/values to use when inserting - Returns: A deferred + Returns: + Deferred(bool): True if a new entry was created, False if an + existing one was updated. """ return self.runInteraction( desc, @@ -498,6 +500,10 @@ class SQLBaseStore(object): ) txn.execute(sql, allvalues.values()) + return True + else: + return False + def _simple_select_one(self, table, keyvalues, retcols, allow_none=False, desc="_simple_select_one"): """Executes a SELECT query on the named table, which is expected to |