mdvtools.dbutils.dbservice ========================== .. py:module:: mdvtools.dbutils.dbservice Classes ------- .. autoapisummary:: mdvtools.dbutils.dbservice.ProjectService mdvtools.dbutils.dbservice.FileService Module Contents --------------- .. py:class:: ProjectService .. py:attribute:: failed_projects :type: list[tuple[int, str | Exception]] :value: [] .. py:method:: get_active_projects() :staticmethod: .. py:method:: get_next_project_id() :staticmethod: .. py:method:: add_new_project(path, name='unnamed_project') :staticmethod: .. py:method:: get_project_by_id(id) :staticmethod: .. py:method:: soft_delete_project(id) :staticmethod: .. py:method:: update_project_name(project_id, new_name) :staticmethod: .. py:method:: change_project_access(project_id, new_access_level) :staticmethod: Change the access level of a project. .. py:method:: set_project_update_timestamp(project_id: str) :staticmethod: .. py:method:: set_project_accessed_timestamp(project_id: str) :staticmethod: .. py:class:: FileService .. py:method:: add_or_update_file_in_project(file_name, file_path, project_id) :staticmethod: Adds a new file or updates an existing file in the database. .. py:method:: get_file_by_path_and_project(file_path, project_id) :staticmethod: Fetch a file by its path and project ID. .. py:method:: file_exists_in_project(file_path, project_id) :staticmethod: Utility function to check if a file exists in the files table. .. py:method:: get_files_by_project(project_id) :staticmethod: .. py:method:: delete_files_by_project(project_id) :staticmethod: .. py:method:: update_file_timestamp(file_id) :staticmethod: