def tbls(dbname): """ :param dbname: The name of a database/sche,a :return: List of tables in the database. """ inputs = log_and_extract_input(tbls, None) rsp = Response(json.dumps(dta.get_tables(dbname)), status=200, content_type="application/json") return rsp
def tbls(dbname): """ :param dbname: The name of a database/sche,a :return: List of tables in the database. """ _ = log_and_extract_input(tbls, {"dbname": dbname}) msg = dta.get_tables(dbname) rsp = Response(json.dumps(msg, default=str), status=200, content_type="application/json") return rsp
def tbls(dbname): """ :param dbname: The name of a database/schema :return: List of tables in the database. """ # Your code goes here. # Hint: Implement the function in data_table_adaptor inputs = log_and_extract_input(dbs, None) tables = dta.get_tables(dbname) rsp_str = json.dumps(tables) rsp = Response(rsp_str, status=200, content_type="application/json") return rsp
def t5(): print( "########################## Test_get_tables ##########################" ) connect_info = { "host": "127.0.0.1:3306", "user": "******", "password": "******" } d = dta.get_tables("lahman2019clean") print("t5 result =", json.dumps(d, indent=2)) print( "########################## Test_get_tables ##########################" )
def t_get_tables(dbname): tables = dta.get_tables(dbname) print(json.dumps(tables, indent=2))
def test3(name): d = dta.get_tables(name) print("tables test: ", json.dumps(d, indent=2))
def t3(dbname): d = dta.get_tables('lahman2019clean') print('t2 result =', json.dumps(d, indent=2))