Added support for view exports
This commit is contained in:
parent
aeb6b1a635
commit
f62e6a58df
@ -70,7 +70,7 @@ def dump():
|
|||||||
print(line)
|
print(line)
|
||||||
print("```")
|
print("```")
|
||||||
|
|
||||||
for view in db.get_views():
|
for view in db.get_views():
|
||||||
print(f"export/view-f{view['name']}.json")
|
print(f"export/view-f{view['name']}.json")
|
||||||
with pathlib.Path(f"export/view-f{view['name']}.json").open("w+") as f:
|
with pathlib.Path(f"export/view-f{view['name']}.json").open("w+") as f:
|
||||||
json.dump(view, db.query(view['sql']))
|
json.dump(view, db.query(view['sql']))
|
Loading…
Reference in New Issue
Block a user