添加当查询多个主域时结果自动合并导出功能

This commit is contained in:
Jing Ling
2019-12-27 18:54:10 +08:00
parent 7c8bd44c37
commit d5f478654b
5 changed files with 73 additions and 19 deletions
+3 -1
View File
@@ -34,10 +34,12 @@ def export(table, db=None, valid=None, dpath=None, format='csv', show=False):
:param str dpath: 导出目录(默认None)
:param bool show: 终端显示导出数据(默认False)
"""
format = utils.check_format(format)
dpath = utils.check_dpath(dpath)
database = Database(db)
rows = database.export_data(table, valid) # 意外情况导出全部子域
line = len(rows)
format = utils.check_format(format, line)
if show:
print(rows.dataset)
if format == 'txt':