Simon Willison

Results 678 issues of Simon Willison

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...

enhancement
cli-tool

Same as: - https://github.com/simonw/datasette/issues/1621

ci

Inspired by this: https://news.ycombinator.com/item?id=29729283 > Because SQLite is effectively serializing all the writes for us, we have zero locking in our code. We used to have to lock when inserting...

enhancement
research

Right now you use `conversions=` like this: ```python db["example"].insert({ "name": "The Bigfoot Discovery Museum" }, conversions={"name": "upper(?)"}) ``` How about if you could optionally provide a Python function (or a...

research
python-library

I'm writing code for https://github.com/simonw/git-history/issues/33 that creates a table inside a loop: ```python item_pk = db[item_table].lookup( {"_item_id": item_id}, item_to_insert, column_order=("_id", "_item_id"), pk="_id", ) ``` I need to look things up...

enhancement
python-library

Inspired by work on `git-history` where I used this pattern: ```python column_name_to_id = {} def column_id(column): if column not in column_name_to_id: id = db["columns"].lookup( {"namespace": namespace_id, "name": column}, foreign_keys=(("namespace", "namespaces",...

enhancement
research
python-library

> Need to figure out a good pattern for testing this in CI too - it will currently skip the new tests if it doesn't have SQLite 3.37 or higher....

ci

New in SQLite 3.37.0, released a few days ago: https://www.sqlite.org/stricttables.html

research

Imagine a table (imported from a nested JSON file) where one of the columns contains values that look like this: {"email": "[email protected]", "id": "usrROSHARE0000000", "name": "Anonymous"} The `sqlite-utils extract` command...

enhancement
python-library
cli-tool