这个提交包含在:
2016-05-07 03:53:27 +02:00
父节点 028ab5910b
当前提交 359bf4feb7

查看文件

@@ -50,6 +50,14 @@ def get_table(cursor, table_name):
cursor.execute('SELECT * FROM main.%s' % table_name) cursor.execute('SELECT * FROM main.%s' % table_name)
return [dict(zip(column_names, row)) for row in cursor.fetchall()] return [dict(zip(column_names, row)) for row in cursor.fetchall()]
def get_tables(cursor):
table_list = get_table_list(cursor)
output = {}
for table_name in table_list:
output[table_name] = get_table(cursor, table_name)
return output
def get_tables(cursor): def get_tables(cursor):
table_list = get_table_list(cursor) table_list = get_table_list(cursor)
return [{table_name : get_table(cursor, table_name) for table_name in table_list}] return [{table_name : get_table(cursor, table_name) for table_name in table_list}]