mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-17 23:50:11 -05:00
Rename database classes to make some sense (#8033)
This commit is contained in:
parent
0a86850ba3
commit
a7bdf98d01
337 changed files with 1408 additions and 1323 deletions
|
|
@ -17,18 +17,19 @@
|
|||
"""
|
||||
The storage layer is split up into multiple parts to allow Synapse to run
|
||||
against different configurations of databases (e.g. single or multiple
|
||||
databases). The `Database` class represents a single physical database. The
|
||||
`data_stores` are classes that talk directly to a `Database` instance and have
|
||||
associated schemas, background updates, etc. On top of those there are classes
|
||||
that provide high level interfaces that combine calls to multiple `data_stores`.
|
||||
databases). The `DatabasePool` class represents connections to a single physical
|
||||
database. The `databases` are classes that talk directly to a `DatabasePool`
|
||||
instance and have associated schemas, background updates, etc. On top of those
|
||||
there are classes that provide high level interfaces that combine calls to
|
||||
multiple `databases`.
|
||||
|
||||
There are also schemas that get applied to every database, regardless of the
|
||||
data stores associated with them (e.g. the schema version tables), which are
|
||||
stored in `synapse.storage.schema`.
|
||||
"""
|
||||
|
||||
from synapse.storage.data_stores import DataStores
|
||||
from synapse.storage.data_stores.main import DataStore
|
||||
from synapse.storage.databases import Databases
|
||||
from synapse.storage.databases.main import DataStore
|
||||
from synapse.storage.persist_events import EventsPersistenceStorage
|
||||
from synapse.storage.purge_events import PurgeEventsStorage
|
||||
from synapse.storage.state import StateGroupStorage
|
||||
|
|
@ -40,7 +41,7 @@ class Storage(object):
|
|||
"""The high level interfaces for talking to various storage layers.
|
||||
"""
|
||||
|
||||
def __init__(self, hs, stores: DataStores):
|
||||
def __init__(self, hs, stores: Databases):
|
||||
# We include the main data store here mainly so that we don't have to
|
||||
# rewrite all the existing code to split it into high vs low level
|
||||
# interfaces.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue