VariantDatabaseHandler.py 892 B

12345678910111213141516171819202122232425
  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(
  10. table="variant",
  11. fields={
  12. "id": "text",
  13. "name": "text",
  14. "hardware_type": "text",
  15. "definition": "text",
  16. "version": "text",
  17. "setting_version": "text",
  18. "reference_extruder_id": "text",
  19. },
  20. ))
  21. self._container_type = InstanceContainer