Implemented and documented sqlite-utils insert --all

This commit is contained in:
Simon Willison 2022-01-05 18:16:51 -08:00
commit e66299c6ed
3 changed files with 38 additions and 3 deletions

View file

@ -785,6 +785,8 @@ def insert_upsert_implementation(
docs = tracker.wrap(docs)
elif lines:
docs = ({"line": line.strip()} for line in decoded)
elif all:
docs = ({"all": decoded.read()},)
elif convert:
fn = _compile_code(convert, imports)
docs = (fn(line) for line in decoded)