Skip to content
Snippets Groups Projects
database_api.py 1.22 KiB
Newer Older
  • Learn to ignore specific revisions
  • fcrisafulli-dev's avatar
    fcrisafulli-dev committed
    class CrisisEventsDatabase:
        def is_initialized() -> bool:
            """Checks if the database has the files neccesary to operate"""
            raise "Not Implemented"
        
        def initialize() -> bool:
            """Creates the files neccesary for the database to operate"""
            raise "Not Implemented"
        
        def get_next_user_id() -> int:
            raise "Not Implemented"
        
        def get_next_collection_id() -> int:
            raise "Not Implemented"
        
        def get_collection(collection_id: int, authenticated_user_id: int) -> tuple[int,int,int,str,str] | None:
            """
            Returns the collection data if the `authenticated_user_id` matches in the corresponding `collection_id` entry.
            
            Otherwise, it returns `None`
            
            The list returned is in the format:
    
            """
            raise "Not Implemented"
        
        def set_collection(collection_id: int, authenticated_user_id: int, collection_data: tuple[int,int,int,str,str]) -> bool:
            """
            Returns the collection data if the `authenticated_user_id` matches in the corresponding `collection_id` entry.
            
            Otherwise, it returns `None`
            
            The list returned is in the format:
    
            """
            raise "Not Implemented"