def showDatabases(): print("AVL") print(avl_mode.showDatabases()) print("b") print(b_mode.showDatabases()) print("b+") print(bplus_mode.showDatabases()) print("dict") print(dict_mode.showDatabases()) print("isam") print(isam_mode.showDatabases()) print("json") print(json_mode.showDatabases()) print("hash") print(hash_mode.showDatabases())
def obtenerBase(database, estructura): val = [] if estructura == 0: val = avl_mode.showDatabases() elif estructura == 1: val = b_mode.showDatabases() elif estructura == 2: val = bplus_mode.showDatabases() elif estructura == 3: val = dict_mode.showDatabases() elif estructura == 4: val = isam_mode.showDatabases() elif estructura == 5: val = json_mode.showDatabases() elif estructura == 6: val = hash_mode.showDatabases() if val == []: return val else: for i in range(len(val)): if val[i].lower() == database.lower(): return estructura return []