def get_all(model, value, field="id"):
    """
    Returns query object with the fields and value filtered.

    :param model:
    :param value:
    :param field:
    :return:
    """
    query = session_query(model)
    return query.filter(get_model_column(model, field) == value)

    Returns query object with the fields and value filtered.

    :param model:
    :param value:
    :param field:
    :return:
    
lemur/database.py