Skip to content
Snippets Groups Projects
database_api.py 1.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • fcrisafulli-dev's avatar
    fcrisafulli-dev committed
    class CrisisEventsDatabase:    
        def initialize(reset: bool) -> bool:
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            """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"
        
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
        def create_collection(self,user_id: int, collection_name:str,collection_type:str):
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            """
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            Returns the collection data if the `user_id` matches in the corresponding `collection_id` entry.
            
            Otherwise, it returns `None`
            
            The list returned is in the format:
    
            """
            raise "Not Implemented"
        
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
        def create_user(self, username: str, password: str):
            raise "Not Implemented"
        
    
        def get_user_by_username(self, username: str):
             raise "Not Implemented"
        
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
        def get_collection(self, collection_id:int):
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            """
            Returns the collection data if the `user_id` matches in the corresponding `collection_id` entry.
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            
            Otherwise, it returns `None`
            
            The list returned is in the format:
    
            """
            raise "Not Implemented"
        
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
        def get_collections(self, user_id: int):
            raise "Not Implemented"
        
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
        def set_collection(self,collection_id:int, user_id: int, collection_json:str, summary:str, name:str) -> bool:
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            """
            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 get_sample_of_collections(self):
            raise "Not Implemented"
        
        def get_info(self) -> str:
            "Returns data about this database"
    
    fcrisafulli-dev's avatar
    fcrisafulli-dev committed
            raise "Not Implemented"