25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.6 KiB

  1. # Copyright 2014-2016 OpenMarket Ltd
  2. # Copyright 2018,2019 New Vector Ltd
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. """
  16. The storage layer is split up into multiple parts to allow Synapse to run
  17. against different configurations of databases (e.g. single or multiple
  18. databases). The `DatabasePool` class represents connections to a single physical
  19. database. The `databases` are classes that talk directly to a `DatabasePool`
  20. instance and have associated schemas, background updates, etc.
  21. On top of the databases are the StorageControllers, located in the
  22. `synapse.storage.controllers` module. These classes provide high level
  23. interfaces that combine calls to multiple `databases`. They are bundled into the
  24. `StorageControllers` singleton for ease of use, and exposed via
  25. `HomeServer.get_storage_controllers()`.
  26. There are also schemas that get applied to every database, regardless of the
  27. data stores associated with them (e.g. the schema version tables), which are
  28. stored in `synapse.storage.schema`.
  29. """
  30. from synapse.storage.databases import Databases
  31. from synapse.storage.databases.main import DataStore
  32. __all__ = ["Databases", "DataStore"]