VariantDatabaseHandler.py 1.0 KB

12345678910111213141516171819202122
  1. # Copyright (c) 2021 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from UM.Settings.SQLQueryFactory import SQLQueryFactory
  4. from UM.Settings.DatabaseContainerMetadataController import DatabaseMetadataContainerController
  5. from UM.Settings.InstanceContainer import InstanceContainer
  6. class VariantDatabaseHandler(DatabaseMetadataContainerController):
  7. """The Database handler for Variant containers"""
  8. def __init__(self):
  9. super().__init__(SQLQueryFactory(table = "variant",
  10. fields = {
  11. "id": "text",
  12. "name": "text",
  13. "hardware_type": "text",
  14. "definition": "text",
  15. "version": "text",
  16. "setting_version": "text"
  17. }))
  18. self._container_type = InstanceContainer