summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-04 14:00:29 +0000
committerErik Johnston <erik@matrix.org>2019-12-05 10:46:37 +0000
commit8863624f7852ffc4a261aa9d17f6f7ddb5bf0c19 (patch)
tree964dcbc48f8af62a735880eb03b57bf4dee6c9ca /synapse/storage/_base.py
parentMove DB pool and helper functions into dedicated Database class (diff)
downloadsynapse-8863624f7852ffc4a261aa9d17f6f7ddb5bf0c19.tar.xz
Comments
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py

index fd5bb3e1de..b7e27d4e97 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py
@@ -31,11 +31,17 @@ logger = logging.getLogger(__name__) class SQLBaseStore(object): + """Base class for data stores that holds helper functions. + + Note that multiple instances of this class will exist as there will be one + per data store (and not one per physical database). + """ + def __init__(self, db_conn, hs): self.hs = hs self._clock = hs.get_clock() self.database_engine = hs.database_engine - self.db = Database(hs) + self.db = Database(hs) # In future this will be passed in self.rand = random.SystemRandom() def _invalidate_state_caches(self, room_id, members_changed):