api/schemas/schema_base.py
def find(
        cls, 
        data_filter: Document, 
        ignore: List[str] = [], 
        hashed: List[str] = [], 
        collection: MongoCollection = None, 
        unhash: bool = False, 
        remove_id: bool = False
    ) -> Union[Any, None]:
        """Function for performing a database query on a collab."""
        c = cls.collection or collection
        q = cls.validate_query(data_filter, ignore, hashed)
        doc = c.find_one(q)
        
        if unhash:
            for i in hashed:
                doc[i] = data_filter[i]
        
        if remove_id:
            del doc['_id']

        return doc
Function for performing a database query on a collab.
Function for performing a database query on a collab.
Function for performing a database query on a collab .
def find(
        cls, 
        data_filter: Document, 
        ignore: List[str] = [], 
        hashed: List[str] = [], 
        collection: MongoCollection = None, 
        unhash: bool = False, 
        remove_id: bool = False
    ) -> Union[Any, None]:
        c = cls.collection or collection
        q = cls.validate_query(data_filter, ignore, hashed)
        doc = c.find_one(q)
        if unhash:
            for i in hashed:
                doc[i] = data_filter[i]
        if remove_id:
            del doc['_id']
        return doc
def find ( cls , data_filter : Document , ignore : List [ str ] = [ ] , hashed : List [ str ] = [ ] , collection : MongoCollection = None , unhash : bool = False , remove_id : bool = False ) -> Union [ Any , None ] : c = cls . collection or collection q = cls . validate_query ( data_filter , ignore , hashed ) doc = c . find_one ( q ) if unhash : for i in hashed : doc [ i ] = data_filter [ i ] if remove_id : del doc [ '_id' ] return doc
Function for performing a database query on a collab.
Function for performing a database query on a collab .
"""Function for performing a database query on a collab."""
cls
data_filter
Document
ignore
List[str]
hashed
List[str]
collection
MongoCollection
unhash
bool
remove_id
bool