simonw / simonw/sqlite-utils

`sqlite-utils insert --extract colname`

Open
#352 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cli-tool enhancement
Dominant language
Python
Stars
2.2k
Forks
172
Avg merge
9m
Merged PRs (30d)
1

Description

Is there a reason I've not added --extract as an option for sqlite-utils insert next? There's a extracts= option for the various table.insert() etc methods - last line in this code block:

https://github.com/simonw/sqlite-utils/blob/213a0ff177f23a35f3b235386366ff132eb879f1/sqlite_utils/db.py#L2483-L2495

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced db.py lines 2483-2495 and trace how the sqlite-utils insert CLI command maps options to the table.insert() methods. Confirm how the existing extracts= behavior should be exposed as --extract colname, then verify the command applies extraction when inserting data.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.