IntentDatabaseHandler.py 1.3 KB

123456789101112131415161718192021222324252627
  1. # Copyright (c) 2023 UltiMaker
  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 IntentDatabaseHandler(DatabaseMetadataContainerController):
  7. """The Database handler for Intent containers"""
  8. def __init__(self) -> None:
  9. super().__init__(SQLQueryFactory(table="intent",
  10. fields={
  11. "id": "text",
  12. "name": "text",
  13. "quality_type": "text",
  14. "intent_category": "text",
  15. "variant": "text",
  16. "definition": "text",
  17. "material": "text",
  18. "version": "text",
  19. "setting_version": "text",
  20. "icon": "text",
  21. "description": "text",
  22. }))
  23. self._container_type = InstanceContainer