(db, filters, collection, depth )
return _listObjects(db, objs, depth, set())
get a list of filtered objects from mongo database   
        depth specified how to dig the dabase to embed the DBRef
get a list of filtered objects from mongo database   
        depth specified how to dig the dabase to embed the DBRef
get a list of filtered objects from mongo database depth specified how to dig the dabase to embed the DBRef
def listObjects(db, filters, collection, depth ):
    """
        get a list of filtered objects from mongo database   
        depth specified how to dig the dabase to embed the DBRef
    """
    
    select = None
    template = None
    
    if filters != None:
        _complex = False
        if "$select" in filters :
            select = filters["$select"]
            _complex = True
        if "$template" in filters :
            template = filters["$template"]
            _complex = True
        if not _complex :
            select = filters
            template = None
            
    objs = list(db[collection].find(select, template))
    return _listObjects(db, objs, depth, set())
def listObjects ( db , filters , collection , depth ) : select = None template = None if filters != None : _complex = False if "$select" in filters : select = filters [ "$select" ] _complex = True if "$template" in filters : template = filters [ "$template" ] _complex = True if not _complex : select = filters template = None objs = list ( db [ collection ] . find ( select , template ) ) return _listObjects ( db , objs , depth , set ( ) )