:py:mod:`database.crud` ======================= .. py:module:: database.crud .. autoapi-nested-parse:: Module for database CRUD operations Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: database.crud.get_user database.crud.get_users_count database.crud.get_projects database.crud.get_project_by_name database.crud.get_document_of_project database.crud.get_system_permission database.crud.get_project_permission database.crud.get_project_permissions database.crud.get_document_permission database.crud.get_document_permissions database.crud.get_ms_project .. py:function:: get_user(session, user_name) Get user by user name :param session: session to use :param user_name: user name :return: user if found, None otherwise .. py:function:: get_users_count(session) Get number of users :param session: session to use :return: number of users .. py:function:: get_projects(session) Get all projects :param session: session to use :return: list of projects .. py:function:: get_project_by_name(session, project_name) Get project by name :param session: session to use :param project_name: project name :return: project if found, None otherwise .. py:function:: get_document_of_project(session, project_name, document_name) Get document of project :param session: session to use :param project_name: project name :param document_name: document name :return: document if found, None otherwise .. py:function:: get_system_permission(session, user_name, permission) Get system permission of user if exists, None otherwise :param session: session to use :param user_name: user name :param permission: permission to find :return: permission if found, None otherwise .. py:function:: get_project_permission(session, user_name, project_name, permission) Get project permission of user if exists, None otherwise :param session: session to use :param user_name: user name :param project_name: project name :param permission: permission to find :return: permission if found, None otherwise .. py:function:: get_project_permissions(session, user_name, project_name) Get project permissions of user :param session: session to use :param user_name: user name :param project_name: project name :return: list of permissions .. py:function:: get_document_permission(session, user_name, project_name, document_name, permission) Get document permission of user if exists, None otherwise :param session: session to use :param user_name: user name :param project_name: project name :param document_name: document name :param permission: permission to find :return: permission if found, None otherwise .. py:function:: get_document_permissions(session, user_name, project_name, document_name) Get document permissions of user :param session: session to use :param user_name: user name :param project_name: project name :param document_name: document name :return: list of permissions .. py:function:: get_ms_project(session, project_name, ms_project_name) Get MS Project of project if exists, None otherwise :param session: session to use :param project_name: project name :param ms_project_name: MS Project name :return: MS Project if found, None otherwise