IntentDatabaseHandler.py 1.2 KB

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 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. }))
  21. self._container_type = InstanceContainer