mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
Better --help text for insert command
This commit is contained in:
parent
1843d55615
commit
441c131db5
1 changed files with 5 additions and 1 deletions
|
|
@ -75,7 +75,11 @@ def optimize(path, no_vacuum):
|
|||
@click.option("--csv", is_flag=True, help="Expect CSV")
|
||||
@click.option("--batch-size", type=int, default=100, help="Commit every X records")
|
||||
def insert(path, table, json_file, pk, nl, csv, batch_size):
|
||||
"Insert records from JSON file into the table, create table if it is missing"
|
||||
"""
|
||||
Insert records from JSON file into a table, creating the table if it does not already exist.
|
||||
|
||||
Input should be a JSON array of objects, unless --nl or --csv is used.
|
||||
"""
|
||||
db = sqlite_utils.Database(path)
|
||||
if nl and csv:
|
||||
click.echo("Use just one of --nl and --csv", err=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue