mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-18 14:34:24 +02:00
Docs for --save and --dump plus made SQL optional for those, refs #273
This commit is contained in:
parent
88b46288b3
commit
435096c563
3 changed files with 39 additions and 4 deletions
|
|
@ -1143,6 +1143,10 @@ def memory(
|
|||
):
|
||||
"Execute SQL query against an in-memory database, optionally populated by imported data"
|
||||
db = sqlite_utils.Database(memory=True)
|
||||
# If --dump or --save used but no paths detected, assume SQL query is a path:
|
||||
if (dump or save) and not paths:
|
||||
paths = [sql]
|
||||
sql = None
|
||||
for i, path in enumerate(paths):
|
||||
if path == "-":
|
||||
csv_fp = sys.stdin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue