jarvis/Database.py
def update(self, modify_function_or_new_object: any) -> None:
        """
        Update all documents using a function or a dictionary with updated keys  
        The if a function is passed, the object the function returns is used,  
        else the merged dictionaries
        """
        if isinstance(modify_function_or_new_object, dict):
            for document in self.document_list:
                def merge_dicts(x, y):
                    z = x.copy()
                    z.update(y)
                    return z
                self.table.insert(merge_dicts(document, modify_function_or_new_object))
        else:
            for old_document in self.document_list:
                new_document = modify_function_or_new_object(dict(old_document))
                self.table.insert(new_document)

        Update all documents using a function or a dictionary with updated keys  
        The if a function is passed, the object the function returns is used,  
        else the merged dictionaries
        
Update all documents using a function or a dictionary with updated keys
The if a function is passed, the object the function returns is used,
else the merged dictionaries
Update all documents using a function or a dictionary with updated keys The if a function is passed the object the function returns is used else the merged dictionaries
def update(self, modify_function_or_new_object: any) -> None:
        if isinstance(modify_function_or_new_object, dict):
            for document in self.document_list:
                def merge_dicts(x, y):
                    z = x.copy()
                    z.update(y)
                    return z
                self.table.insert(merge_dicts(document, modify_function_or_new_object))
        else:
            for old_document in self.document_list:
                new_document = modify_function_or_new_object(dict(old_document))
                self.table.insert(new_document)
def update ( self , modify_function_or_new_object : any ) -> None : if isinstance ( modify_function_or_new_object , dict ) : for document in self . document_list : def merge_dicts ( x , y ) : z = x . copy ( ) z . update ( y ) return z self . table . insert ( merge_dicts ( document , modify_function_or_new_object ) ) else : for old_document in self . document_list : new_document = modify_function_or_new_object ( dict ( old_document ) ) self . table . insert ( new_document )
Update all documents using a function or a dictionary with updated keys
The if a function is passed, the object the function returns is used,
else the merged dictionaries
Update all documents using a function or a dictionary with updated keys The if a function is passed the object the function returns is used else the merged dictionaries
"""
        Update all documents using a function or a dictionary with updated keys  
        The if a function is passed, the object the function returns is used,  
        else the merged dictionaries
        """
self
modify_function_or_new_object
any