def searchexact(text, table, fieldname, session):
    """
    Universal exact search function for table/field name
    :param text: search text (string)
    :param table: db table class object
    :param fieldname: dbtable field object
    :param session: Database session object
    :return: query results
    """

    results = session.query(table).filter(fieldname == text).all()

    # check if query has returned results
    if results:
        return results
    else:
        return ['No results found']