diff options
author | Patrick Cloke <patrickc@matrix.org> | 2022-12-14 12:08:21 -0500 |
---|---|---|
committer | Patrick Cloke <patrickc@matrix.org> | 2023-05-17 14:26:01 -0400 |
commit | c25ec34d732952dcc1a4ecb89652f11a9cd43a48 (patch) | |
tree | 4728156955ec3f05fa52330af12becd5980f4321 /synapse/storage/_base.py | |
parent | Add a new admin API to create a new device for a user. (#15611) (diff) | |
download | synapse-c25ec34d732952dcc1a4ecb89652f11a9cd43a48.tar.xz |
✨ Magic ✨
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 481fec72fe..a30ebda0c8 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -25,6 +25,7 @@ from synapse.util.caches.descriptors import CachedFunction if TYPE_CHECKING: from synapse.server import HomeServer + from synapse.storage.databases import DataStore logger = logging.getLogger(__name__) @@ -44,11 +45,14 @@ class SQLBaseStore(metaclass=ABCMeta): database: DatabasePool, db_conn: LoggingDatabaseConnection, hs: "HomeServer", + datastore: Optional["DataStore"] = None, ): self.hs = hs self._clock = hs.get_clock() self.database_engine = database.engine self.db_pool = database + # A reference back to the root datastore. + self.datastore = datastore self.external_cached_functions: Dict[str, CachedFunction] = {} |