mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Give sensible names for '_simple_...' transactions
This commit is contained in:
parent
fce0114005
commit
dc0c989ef4
13 changed files with 93 additions and 38 deletions
|
@ -50,7 +50,8 @@ class PushRuleStore(SQLBaseStore):
|
|||
results = yield self._simple_select_list(
|
||||
PushRuleEnableTable.table_name,
|
||||
{'user_name': user_name},
|
||||
PushRuleEnableTable.fields
|
||||
PushRuleEnableTable.fields,
|
||||
desc="get_push_rules_enabled_for_user",
|
||||
)
|
||||
defer.returnValue(
|
||||
{r['rule_id']: False if r['enabled'] == 0 else True for r in results}
|
||||
|
@ -201,7 +202,8 @@ class PushRuleStore(SQLBaseStore):
|
|||
"""
|
||||
yield self._simple_delete_one(
|
||||
PushRuleTable.table_name,
|
||||
{'user_name': user_name, 'rule_id': rule_id}
|
||||
{'user_name': user_name, 'rule_id': rule_id},
|
||||
desc="delete_push_rule",
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -209,7 +211,8 @@ class PushRuleStore(SQLBaseStore):
|
|||
yield self._simple_upsert(
|
||||
PushRuleEnableTable.table_name,
|
||||
{'user_name': user_name, 'rule_id': rule_id},
|
||||
{'enabled': enabled}
|
||||
{'enabled': enabled},
|
||||
desc="set_push_rule_enabled",
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue