def clear_results_db(session):
    '''Used to clear the result tables in the OEDB. Caution!
        This deletes EVERY RESULT SET!'''

    from egoio.db_tables.model_draft import EgoGridPfHvResultBus as BusResult,\
        EgoGridPfHvResultBusT as BusTResult,\
        EgoGridPfHvResultStorage as StorageResult,\
        EgoGridPfHvResultStorageT as StorageTResult,\
        EgoGridPfHvResultGenerator as GeneratorResult,\
        EgoGridPfHvResultGeneratorT as GeneratorTResult,\
        EgoGridPfHvResultLine as LineResult,\
        EgoGridPfHvResultLineT as LineTResult,\
        EgoGridPfHvResultLoad as LoadResult,\
        EgoGridPfHvResultLoadT as LoadTResult,\
        EgoGridPfHvResultTransformer as TransformerResult,\
        EgoGridPfHvResultTransformerT as TransformerTResult,\
        EgoGridPfHvResultMeta as ResultMeta
    print('Are you sure that you want to clear all results in the OEDB?')
    choice = ''
    while choice not in ['y', 'n']:
        choice = input('(y/n): ')
    if choice == 'y':
        print('Are you sure?')
        choice2 = ''
        while choice2 not in ['y', 'n']:
            choice2 = input('(y/n): ')
        if choice2 == 'y':
            print('Deleting all results...')
            session.query(BusResult).delete()
            session.query(BusTResult).delete()
            session.query(StorageResult).delete()
            session.query(StorageTResult).delete()
            session.query(GeneratorResult).delete()
            session.query(GeneratorTResult).delete()
            session.query(LoadResult).delete()
            session.query(LoadTResult).delete()
            session.query(LineResult).delete()
            session.query(LineTResult).delete()
            session.query(TransformerResult).delete()
            session.query(TransformerTResult).delete()
            session.query(ResultMeta).delete()
            session.commit()
        else:
            print('Deleting aborted!')
    else:
        print('Deleting aborted!')
Used to clear the result tables in the OEDB. Caution!
        This deletes EVERY RESULT SET!