コード例 #1
0
ファイル: admin_choice.py プロジェクト: duoduo3369/SQLess
def admin_show_choice(token):
    try:
        choice_type = token[1]
    except:
        #print 'Your input was wrong, near show ...'
        return False
    if choice_type == 'databases':
        show_databases()
        return True
    elif choice_type == 'tables':
        tables = show_tables(default_variable.CURRENT_DB)
        if tables is None:
            return False
        else:
            return True
    else:
        return False
コード例 #2
0
ファイル: test.py プロジェクト: duoduo3369/SQLess
def test_show_tables():
    database_name = 'a'
    show_tables(database_name)
    database_name = 'b'
    show_tables(database_name)
    raw_input('>')