diff options
author | Erik Johnston <erik@matrix.org> | 2019-12-09 13:53:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 13:53:21 +0000 |
commit | 30e9adf32f7db9aa44693876d33692bf4590d363 (patch) | |
tree | 9b83e1dc2eeefaafe8eca4e5b95cffdf8572b346 /synapse/storage/__init__.py | |
parent | Merge pull request #6493 from matrix-org/erikj/invite_state_config (diff) | |
parent | Fix comment (diff) | |
download | synapse-30e9adf32f7db9aa44693876d33692bf4590d363.tar.xz |
Merge pull request #6487 from matrix-org/erikj/pass_in_db
Pass in Database object to data stores.
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 8fb18203dc..ec89f645d4 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -49,15 +49,3 @@ class Storage(object): self.persistence = EventsPersistenceStorage(hs, stores) self.purge_events = PurgeEventsStorage(hs, stores) self.state = StateGroupStorage(hs, stores) - - -def are_all_users_on_domain(txn, database_engine, domain): - sql = database_engine.convert_param_style( - "SELECT COUNT(*) FROM users WHERE name NOT LIKE ?" - ) - pat = "%:" + domain - txn.execute(sql, (pat,)) - num_not_matching = txn.fetchall()[0][0] - if num_not_matching == 0: - return True - return False |