Exemplo n.º 1
0
def showDatabases():
    showAvl = avl.showDatabases()
    showB = b.showDatabases()
    showBP = bplus.showDatabases()
    showDict = DM.showDatabases()
    showIsam = isam.showDatabases()
    showHash = Hash.showDatabases()
    showJson = j.showDatabases()
    showALL = 'avl = ' + str(showAvl)+'\n'+'b = ' + str(showB)+'\n'+'bplus = ' + str(showBP)+'\n'+'dict = ' + str(showDict)+'\n'+'isam = ' + str(showIsam)+'\n'+'json = ' + str(showJson) +'\n'+'hash = ' + str(showHash)
                
    return showALL
Exemplo n.º 2
0
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())
Exemplo n.º 3
0
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 []