{"id": 1066474200, "node_id": "I_kwDOCGYnMM4_kRrY", "number": 344, "title": "Support STRICT tables", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 14, "created_at": "2021-11-29T20:32:23Z", "updated_at": "2023-12-08T05:22:39Z", "closed_at": "2023-12-08T05:22:39Z", "author_association": "OWNER", "pull_request": null, "body": "New in SQLite 3.37.0, released a few days ago: https://www.sqlite.org/stricttables.html", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/344/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 2029161033, "node_id": "I_kwDOCGYnMM548opJ", "number": 606, "title": "str and int as aliases for text and integer", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-12-06T18:35:49Z", "updated_at": "2023-12-06T19:44:04Z", "closed_at": "2023-12-06T18:49:32Z", "author_association": "OWNER", "pull_request": null, "body": "I keep making this mistake:\r\n```bash\r\nsqlite-utils add-column content.db assets _since int\r\n```\r\n```\r\nUsage: sqlite-utils add-column [OPTIONS] PATH TABLE COL_NAME [[integer|float|b\r\n lob|text|INTEGER|FLOAT|BLOB|TEXT]]\r\nTry 'sqlite-utils add-column -h' for help.\r\n\r\nError: Invalid value for '[[integer|float|blob|text|INTEGER|FLOAT|BLOB|TEXT]]':\r\n 'int' is not one of 'integer', 'float', 'blob', 'text', 'INTEGER', 'FLOAT', 'BLOB', 'TEXT'.\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/606/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1977155641, "node_id": "I_kwDOCGYnMM512QA5", "number": 601, "title": "Move plugin directory into documentation", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2023-11-04T04:07:52Z", "updated_at": "2023-11-04T04:07:52Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils-plugins should be in the official documentation.\r\n\r\nI can use the same pattern as https://llm.datasette.io/en/stable/plugins/directory.html\r\n\r\nhttps://til.simonwillison.net/readthedocs/stable-docs", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/601/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1884335789, "node_id": "PR_kwDOCGYnMM5Zs0KB", "number": 591, "title": "Test against Python 3.12 preview", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-09-06T16:10:00Z", "updated_at": "2023-11-04T00:58:03Z", "closed_at": "2023-11-04T00:58:02Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/591", "body": "https://dev.to/hugovk/help-test-python-312-beta-1508/\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--591.org.readthedocs.build/en/591/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/591/reactions\", \"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 1, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 944846776, "node_id": "MDU6SXNzdWU5NDQ4NDY3NzY=", "number": 297, "title": "Option for importing CSV data using the SQLite .import mechanism", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 23, "created_at": "2021-07-14T22:36:41Z", "updated_at": "2023-09-22T20:49:52Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "As seen in https://til.simonwillison.net/sqlite/import-csv - `.mode csv` and then `.import school.csv schools` is hugely faster than importing via `sqlite-utils insert` and doing the work in Python - but it can only be implemented by shelling out to the `sqlite3` CLI tool, it's not functionality that is exposed to the Python `sqlite3` module.\r\n\r\nAn option to use this would be useful - maybe something like this:\r\n\r\n sqlite-utils insert blah.db blah blah.csv --fast", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/297/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1891614971, "node_id": "I_kwDOCGYnMM5wv8D7", "number": 594, "title": "Represent compound foreign keys in table.foreign_keys output", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-09-12T03:48:24Z", "updated_at": "2023-09-12T03:51:13Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Given this schema:\r\n```sql\r\nCREATE TABLE departments (\r\n campus_name TEXT NOT NULL,\r\n dept_code TEXT NOT NULL,\r\n dept_name TEXT,\r\n PRIMARY KEY (campus_name, dept_code)\r\n);\r\nCREATE TABLE courses (\r\n course_code TEXT PRIMARY KEY,\r\n course_name TEXT,\r\n campus_name TEXT NOT NULL,\r\n dept_code TEXT NOT NULL,\r\n FOREIGN KEY (campus_name, dept_code) REFERENCES departments(campus_name, dept_code)\r\n);\r\n```\r\nThe output of `db[\"courses\"].foreign_keys` right now is:\r\n```\r\n[ForeignKey(table='courses', column='campus_name', other_table='departments', other_column='campus_name'),\r\n ForeignKey(table='courses', column='dept_code', other_table='departments', other_column='dept_code')]\r\n```\r\nWhich suggests two normal foreign keys, not one compound foreign key.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/594/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1886771493, "node_id": "I_kwDOCGYnMM5wddkl", "number": 592, "title": "`table.transform()` should preserve `rowid` values", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 6, "created_at": "2023-09-08T00:42:38Z", "updated_at": "2023-09-10T17:46:41Z", "closed_at": "2023-09-09T00:45:32Z", "author_association": "OWNER", "pull_request": null, "body": "I just spotted a bug when using https://datasette.io/plugins/datasette-configure-fts and https://datasette.io/plugins/datasette-edit-schema at the same time.\r\n\r\nSteps to reproduce:\r\n\r\n- Configure FTS for a table, then run a test search\r\n- Edit the schema for that table and change the order of columns\r\n- Run the test search again\r\n\r\nI got the wrong search results, which I think is because the `_fts` table pointed to the first table by `rowid` but those `rowid` values were entirely rewritten as a consequence of running `table.transform()` on the table.\r\n\r\nReconfiguring FTS on the table fixed the problem.\r\n\r\nI think `table.transform()` should be able to preserve `rowid` values.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/592/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1886783150, "node_id": "PR_kwDOCGYnMM5Z1H1d", "number": 593, "title": ".transform() now preserves rowid values, refs #592", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-09-08T01:02:28Z", "updated_at": "2023-09-10T17:44:59Z", "closed_at": "2023-09-09T00:45:30Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/593", "body": "Refs:\r\n- #592\r\n\r\n- [x] Tests against weird shaped tables\r\n\r\nI need to test that this works against:\r\n\r\n- `rowid` tables\r\n- Tables that have a column called `rowid` even though they are not rowid tables\r\n\r\n\r\n\r\n----\r\n:books: Documentation preview :books:: https://sqlite-utils--593.org.readthedocs.build/en/593/\r\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/593/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1879214365, "node_id": "I_kwDOCGYnMM5wAokd", "number": 590, "title": "Ability to tell if a Database is an in-memory one", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-09-03T19:50:15Z", "updated_at": "2023-09-03T19:50:36Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Currently the constructor accepts `memory=True` or `memory_name=...` and uses those to create a connection, but does not record what those values were:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/1260bdc7bfe31c36c272572c6389125f8de6ef71/sqlite_utils/db.py#L307-L349\r\n\r\nThis makes it hard to tell if a database object is to an in-memory or a file-based database, which is sometimes useful to know.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/590/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1879209560, "node_id": "I_kwDOCGYnMM5wAnZY", "number": 589, "title": "Mechanism for de-registering registered SQL functions", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-09-03T19:32:39Z", "updated_at": "2023-09-03T19:36:34Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "I used a custom SQL function in a migration script and then realized that it should be de-registered before the end of the script to avoid leaking into the calling code.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/589/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1868713944, "node_id": "I_kwDOCGYnMM5vYk_Y", "number": 588, "title": "`table.get(column=value)` option for retrieving things not by their primary key", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-08-28T00:41:23Z", "updated_at": "2023-08-28T00:41:54Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "This came up working on this feature:\r\n- https://github.com/simonw/llm/pull/186\r\n\r\nI have a table with this schema:\r\n```sql\r\nCREATE TABLE [collections] (\r\n [id] INTEGER PRIMARY KEY,\r\n [name] TEXT,\r\n [model] TEXT\r\n);\r\nCREATE UNIQUE INDEX [idx_collections_name]\r\n ON [collections] ([name]);\r\n```\r\nSo the primary key is an integer (because it's going to have a huge number of rows foreign key related to it, and I don't want to store a larger text value thousands of times), but there is a unique constraint on the `name` - that would be the primary key column if not for all of those foreign keys.\r\n\r\nProblem is, fetching the collection by name is actually pretty inconvenient.\r\n\r\nFetch by numeric ID:\r\n\r\n```python\r\ntry:\r\n table[\"collections\"].get(1)\r\nexcept NotFoundError:\r\n # It doesn't exist\r\n```\r\nFetching by name:\r\n```python\r\ndef get_collection(db, collection):\r\n rows = db[\"collections\"].rows_where(\"name = ?\", [collection])\r\n try:\r\n return next(rows)\r\n except StopIteration:\r\n raise NotFoundError(\"Collection not found: {}\".format(collection))\r\n```\r\nIt would be neat if, for columns where we know that we should always get 0 or one result, we could do this instead:\r\n```python\r\ntry:\r\n collection = table[\"collections\"].get(name=\"entries\")\r\nexcept NotFoundError:\r\n # It doesn't exist\r\n```\r\nThe existing `.get()` method doesn't have any non-positional arguments, so using `**kwargs` like that should work:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/1260bdc7bfe31c36c272572c6389125f8de6ef71/sqlite_utils/db.py#L1495", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/588/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1857851384, "node_id": "I_kwDOCGYnMM5uvI_4", "number": 587, "title": "New .add_foreign_key() can break if PRAGMA legacy_alter_table=ON and there's an invalid foreign key reference", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-08-19T20:01:26Z", "updated_at": "2023-08-19T20:04:33Z", "closed_at": "2023-08-19T20:04:32Z", "author_association": "OWNER", "pull_request": null, "body": "Extremely detailed story of how I got to this point:\r\n\r\n- https://github.com/simonw/llm/issues/162\r\n\r\nSteps to reproduce (only if that pragma is on though):\r\n```bash\r\npython -c '\r\nimport sqlite_utils\r\ndb = sqlite_utils.Database(memory=True)\r\ndb.execute(\"\"\"\r\nCREATE TABLE \"logs\" (\r\n [id] INTEGER PRIMARY KEY,\r\n [model] TEXT,\r\n [prompt] TEXT,\r\n [system] TEXT,\r\n [prompt_json] TEXT,\r\n [options_json] TEXT,\r\n [response] TEXT,\r\n [response_json] TEXT,\r\n [reply_to_id] INTEGER,\r\n [chat_id] INTEGER REFERENCES [log]([id]),\r\n [duration_ms] INTEGER,\r\n [datetime_utc] TEXT\r\n);\r\n\"\"\")\r\ndb[\"logs\"].add_foreign_key(\"reply_to_id\", \"logs\", \"id\")\r\n'\r\n```\r\nThis succeeds in some environments, fails in others.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/587/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1817289521, "node_id": "I_kwDOCGYnMM5sUaMx", "number": 577, "title": "Get `add_foreign_keys()` to work without modifying `sqlite_master`", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 9, "created_at": "2023-07-23T20:40:18Z", "updated_at": "2023-08-18T17:43:11Z", "closed_at": "2023-08-18T00:48:10Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/blob/13ebcc575d2547c45e8d31288b71a3242c16b886/sqlite_utils/db.py#L1165-L1174\r\n\r\nThis is the only place in the code that attempts to modify `sqlite_master` directly, which fails on some Python installations.\r\n\r\nCould this use the `.transform()` trick instead?\r\n\r\nOr automatically switch to that trick if it hits an error?", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/577/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1856075668, "node_id": "I_kwDOCGYnMM5uoXeU", "number": 586, "title": ".transform() fails to drop column if table is part of a view", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-08-18T05:25:22Z", "updated_at": "2023-08-18T06:13:47Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "I got this error trying to drop a column from a table that was part of a SQL view:\r\n\r\n> error in view plugins: no such table: main.pypi_releases\r\n\r\nUpon further investigation I found that this pattern seemed to fix it:\r\n```python\r\ndef transform_the_table(conn):\r\n # Run this in a transaction:\r\n with conn:\r\n # We have to read all the views first, because we need to drop and recreate them\r\n db = sqlite_utils.Database(conn)\r\n views = {v.name: v.schema for v in db.views if table.lower() in v.schema.lower()}\r\n for view in views.keys():\r\n db[view].drop()\r\n db[table].transform(\r\n types=types,\r\n rename=rename,\r\n drop=drop,\r\n column_order=[p[0] for p in order_pairs],\r\n )\r\n # Now recreate the views\r\n for name, schema in views.items():\r\n db.create_view(name, schema)\r\n```\r\nSo grab a copy of any view that might reference this table, start a transaction, drop those views, run the transform, recreate the views again.\r\n\r\n> I wonder if this should become an option in `sqlite-utils`? Maybe a `recreate_views=True` argument for `table.tranform(...)`? Should it be opt-in or opt-out?\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/datasette-edit-schema/issues/35#issuecomment-1683370548_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/586/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1855894222, "node_id": "I_kwDOCGYnMM5unrLO", "number": 585, "title": "CLI equivalents to `transform(add_foreign_keys=)`", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 7, "created_at": "2023-08-18T01:07:15Z", "updated_at": "2023-08-18T01:51:16Z", "closed_at": "2023-08-18T01:51:15Z", "author_association": "OWNER", "pull_request": null, "body": "The new options added in:\r\n- #577\r\nDeserve consideration in the CLI as well.\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/d2bcdc00c6ecc01a6e8135e775ffdb87572b802b/sqlite_utils/db.py#L1706-L1708", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/585/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1855836914, "node_id": "I_kwDOCGYnMM5undLy", "number": 583, "title": "Get rid of test.utils.collapse_whitespace", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-08-17T23:31:09Z", "updated_at": "2023-08-18T00:59:19Z", "closed_at": "2023-08-18T00:59:19Z", "author_association": "OWNER", "pull_request": null, "body": "I have a neater pattern for this now - instead of: https://github.com/simonw/sqlite-utils/blob/1dc6b5aa644a92d3654f7068110ed7930989ce71/tests/test_create.py#L472-L475\r\n\r\nI now prefer:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/1dc6b5aa644a92d3654f7068110ed7930989ce71/tests/test_create.py#L1163-L1171", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/583/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1855838223, "node_id": "PR_kwDOCGYnMM5YM-I3", "number": 584, "title": ".transform() instead of modifying sqlite_master for add_foreign_keys", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 13, "created_at": "2023-08-17T23:32:45Z", "updated_at": "2023-08-18T00:48:13Z", "closed_at": "2023-08-18T00:48:08Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/584", "body": "Refs:\r\n- #577\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--584.org.readthedocs.build/en/584/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/584/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1818838294, "node_id": "I_kwDOCGYnMM5saUUW", "number": 578, "title": "Plugin hook for adding new output formats", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 5, "created_at": "2023-07-24T17:29:18Z", "updated_at": "2023-08-07T15:41:49Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "> What would it take to add a format hook? I'm still thinking about my GIS workflow, and being able to do `sqlite-utils query ... --geojson` would be nice. It's the one place my Datasette workflow is messy, having to do `datasette . --get /path/to/query.geojson --setting max_rows_returned 10000 --load-extension spatialite`.\r\n> I know the current pattern is `--csv`, but maybe `--format geojson` is more future-proof.\r\n\r\nhttps://discord.com/channels/823971286308356157/997738192360964156/1133076679011602432", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/578/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1823160748, "node_id": "I_kwDOCGYnMM5sqzms", "number": 581, "title": "`sqlite-utils convert --pdb` option", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-07-26T21:02:50Z", "updated_at": "2023-07-26T21:07:45Z", "closed_at": "2023-07-26T21:06:10Z", "author_association": "OWNER", "pull_request": null, "body": "While using `sqlite-utils convert` I realized it would be handy if you could pass `--pdb` to have it open the debugger at the first instance of a failed conversion.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/581/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816997390, "node_id": "I_kwDOCGYnMM5sTS4O", "number": 576, "title": "Backfill the release notes prior to 0.4", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-07-23T05:41:42Z", "updated_at": "2023-07-23T05:49:51Z", "closed_at": "2023-07-23T05:48:21Z", "author_association": "OWNER", "pull_request": null, "body": "Currently the changelog starts at 0.4:\r\n\r\nhttps://sqlite-utils.datasette.io/en/3.34/changelog.html#id115\r\n\r\nI want the other releases - according to https://pypi.org/project/sqlite-utils/#history there are three missing:\r\n\r\n\"image\"\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/576/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816919568, "node_id": "I_kwDOCGYnMM5sS_4Q", "number": 575, "title": "Python API ability to opt-out of connection plugins", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-07-22T23:01:13Z", "updated_at": "2023-07-22T23:17:22Z", "closed_at": "2023-07-22T23:08:22Z", "author_association": "OWNER", "pull_request": null, "body": "Plugins affecting the CLI by default makes sense to me.\r\n\r\nI'm less confident about them _always_ affecting users of the Python API.\r\n\r\nI'm going to have them apply by default, but I'm going to add a mechanism to opt-out on an individual database basis. Basically this:\r\n\r\n```python\r\nfrom sqlite_utils import Database\r\ndb = Database(memory=True, execute_plugins=False)\r\n# Anything using db from here on will not execute plugins\r\n```\r\ncc @asg017 \r\n\r\nRefs:\r\n- #567 \r\n- #574 ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/575/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816918185, "node_id": "I_kwDOCGYnMM5sS_ip", "number": 574, "title": "`prepare_connection()` plugin hook", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-07-22T22:52:47Z", "updated_at": "2023-07-22T23:13:14Z", "closed_at": "2023-07-22T22:59:10Z", "author_association": "OWNER", "pull_request": null, "body": "> Splitting off an issue for `prepare_connection()` since Alex got the PR in seconds before I shipped 3.34!\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/567#issuecomment-1646686424_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/574/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816876211, "node_id": "I_kwDOCGYnMM5sS1Sz", "number": 571, "title": "`.transform(keep_table=...)` option", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-07-22T19:49:29Z", "updated_at": "2023-07-22T22:32:18Z", "closed_at": "2023-07-22T22:32:18Z", "author_association": "OWNER", "pull_request": null, "body": ">> Also need a design for an option for the `.transform()` method to indicate that the new table should be created with a new name without dropping the old one.\r\n>\r\n> I think `keep_table=\"name_of_table\"` is good for this.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/565#issuecomment-1646657324_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/571/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816877910, "node_id": "I_kwDOCGYnMM5sS1tW", "number": 572, "title": "Don't test Python 3.7 against textual", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-07-22T19:57:03Z", "updated_at": "2023-07-22T22:16:50Z", "closed_at": "2023-07-22T22:16:50Z", "author_association": "OWNER", "pull_request": null, "body": "Spotted this in the GitHub Actions logs:\r\n\r\n![IMG_5046](https://github.com/simonw/sqlite-utils/assets/9599/81fb1093-cd8a-4019-a612-2e49b500c933)\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/572/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1786243905, "node_id": "I_kwDOCGYnMM5qd-tB", "number": 564, "title": "Document that running `db.transform()` tidies up the schema indentation", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2023-07-03T13:59:28Z", "updated_at": "2023-07-22T22:15:34Z", "closed_at": "2023-07-22T22:15:34Z", "author_association": "OWNER", "pull_request": null, "body": "> ... and it turns out running `.transform()` with no arguments still fixes the format of the schema!\r\n\r\n```pycon\r\n>>> db[\"log\"].add_column(\"foo\", str)\r\n\r\n>>> db[\"log\"].add_column(\"bar\", str)\r\n
\r\n>>> db[\"log\"].add_column(\"baz\", str)\r\n
\r\n>>> print(db[\"log\"].schema)\r\nCREATE TABLE \"log\" (\r\n [id] INTEGER PRIMARY KEY,\r\n [name2] TEXT,\r\n [age] INTEGER,\r\n [weight] FLOAT\r\n, [foo] TEXT, [bar] TEXT, [baz] TEXT)\r\n>>> db[\"log\"].transform()\r\n
\r\n>>> print(db[\"log\"].schema)\r\nCREATE TABLE \"log\" (\r\n [id] INTEGER PRIMARY KEY,\r\n [name2] TEXT,\r\n [age] INTEGER,\r\n [weight] FLOAT,\r\n [foo] TEXT,\r\n [bar] TEXT,\r\n [baz] TEXT\r\n)\r\n```\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/llm/issues/65#issuecomment-1618347727_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/564/reactions\", \"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 1}", "draft": null, "state_reason": "completed"} {"id": 1205687423, "node_id": "I_kwDOCGYnMM5H3VR_", "number": 426, "title": "CLI docs should link to Python docs and vice versa", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": {"value": 9599, "label": "simonw"}, "milestone": null, "comments": 1, "created_at": "2022-04-15T16:05:15Z", "updated_at": "2023-07-22T22:13:22Z", "closed_at": "2023-07-22T22:13:22Z", "author_association": "OWNER", "pull_request": null, "body": "For every command/API method there should be a link to the equivalent in the other form factor.\r\n\r\nMaybe also link to the API and CLI reference pages too.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/426/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1786258502, "node_id": "I_kwDOCGYnMM5qeCRG", "number": 565, "title": "Table renaming: db.rename_table() and sqlite-utils rename-table", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 6, "created_at": "2023-07-03T14:07:42Z", "updated_at": "2023-07-22T22:12:40Z", "closed_at": "2023-07-22T22:12:40Z", "author_association": "OWNER", "pull_request": null, "body": "> I find myself wanting two new features in `sqlite-utils`:\r\n> - The ability to have the new transformed table set to a specific name, while keeping the old table around\r\n> - The ability to rename a table (`sqlite-utils` doesn't have a table rename function at all right now)\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/llm/issues/65#issuecomment-1618375042_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/565/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816851056, "node_id": "I_kwDOCGYnMM5sSvJw", "number": 568, "title": "table.create(..., replace=True)", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 7, "created_at": "2023-07-22T18:12:22Z", "updated_at": "2023-07-22T19:25:35Z", "closed_at": "2023-07-22T19:15:44Z", "author_association": "OWNER", "pull_request": null, "body": "Found myself using this pattern to quickly prototype a schema:\r\n\r\n```python\r\nimport sqlite_utils\r\ndb = sqlite_utils.Database(memory=True)\r\n\r\nprint(db[\"answers_chunks\"].create({\r\n \"id\": int,\r\n \"content\": str,\r\n \"embedding_type_id\": int,\r\n \"embedding\": bytes,\r\n \"embedding_content_md5\": str,\r\n \"source\": str,\r\n}, pk=\"id\", transform=True).schema)\r\n```\r\n\r\n\"image\"\r\n\r\nUsing `replace=True` to drop and then recreate the table would be neat here, and would be consistent with other places that use `replace=True`.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/568/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816852402, "node_id": "I_kwDOCGYnMM5sSvey", "number": 569, "title": "register_command plugin hook", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-07-22T18:17:27Z", "updated_at": "2023-07-22T19:19:35Z", "closed_at": "2023-07-22T19:19:35Z", "author_association": "OWNER", "pull_request": null, "body": "> I'm going to start by adding the `register_command` hook using the exact same pattern as Datasette and LLM.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/567#issuecomment-1646643450_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/569/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1816857105, "node_id": "I_kwDOCGYnMM5sSwoR", "number": 570, "title": "`sqlite-utils install -e` option", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2023-07-22T18:32:23Z", "updated_at": "2023-07-22T18:55:59Z", "closed_at": "2023-07-22T18:32:56Z", "author_association": "OWNER", "pull_request": null, "body": "As seen in LLM.\r\n\r\nNeeded while working on:\r\n- #567", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/570/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1785360409, "node_id": "I_kwDOCGYnMM5qanAZ", "number": 563, "title": "`--empty-null` option when importing CSV", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-07-03T05:23:36Z", "updated_at": "2023-07-03T05:44:43Z", "closed_at": "2023-07-03T05:42:30Z", "author_association": "OWNER", "pull_request": null, "body": "CSV files with empty cells in (which come through as the empty string) are common and a bit gross.\r\n\r\nHaving an option that means \"and if it's an empty string store `null` instead) would be cool.\r\n\r\nI brainstormed name options here https://chat.openai.com/share/c947b738-ee7d-419c-af90-bc84e90987da", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/563/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1784794489, "node_id": "I_kwDOCGYnMM5qYc15", "number": 562, "title": "Explore the intersection between sqlite-utils and dataclasses", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-07-02T19:23:08Z", "updated_at": "2023-07-02T19:26:39Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "> Aside: this makes me think it might be cool if `sqlite-utils` had a way of working with dataclasses rather than just dicts, and knew how to create a SQLite table to match a dataclass and maybe how to code-generate dataclasses for a specific table schema (dynamically or even using code-generation that can be written to disk, for better editor integrations).\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/llm/issues/65#issuecomment-1616742529_\r\n ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/562/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1777548699, "node_id": "I_kwDOCGYnMM5p8z2b", "number": 561, "title": "`--stop-after` option for `insert` and `upsert` commands", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-06-27T18:44:15Z", "updated_at": "2023-06-27T18:50:09Z", "closed_at": "2023-06-27T18:50:08Z", "author_association": "OWNER", "pull_request": null, "body": "I found myself wanting to insert rows from a 849MB CSV file without processing the whole thing: https://huggingface.co/datasets/jerpint-org/HackAPrompt-Playground-Submissions/tree/main", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/561/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1773458985, "node_id": "PR_kwDOCGYnMM5T2mMb", "number": 560, "title": "Use sqlean if available in environment", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 10, "created_at": "2023-06-25T19:48:48Z", "updated_at": "2023-06-26T08:21:00Z", "closed_at": "2023-06-25T23:25:51Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/560", "body": "Refs:\r\n- #559 \r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--560.org.readthedocs.build/en/560/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/560/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1773450152, "node_id": "I_kwDOCGYnMM5ptLOo", "number": 559, "title": "sqlean support", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2023-06-25T19:27:26Z", "updated_at": "2023-06-25T23:25:53Z", "closed_at": "2023-06-25T23:25:53Z", "author_association": "OWNER", "pull_request": null, "body": "If sqlean is available, use that.\r\n\r\nRefs:\r\n- https://github.com/nalgeon/sqlean.py/issues/1#issuecomment-1605707788\r\n\r\nThis will provide a good workaround for:\r\n- #235 ", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/559/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718612569, "node_id": "I_kwDOCGYnMM5mb_JZ", "number": 552, "title": "Document how to setup shell auto-completion", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-05-21T19:20:41Z", "updated_at": "2023-05-21T21:05:16Z", "closed_at": "2023-05-21T21:03:40Z", "author_association": "OWNER", "pull_request": null, "body": "https://click.palletsprojects.com/en/8.1.x/shell-completion/\r\n\r\nThis works for `zsh`:\r\n\r\n eval \"$(_SQLITE_UTILS_COMPLETE=zsh_source sqlite-utils)\"\r\n\r\nThis will probably work for `bash`:\r\n\r\n eval \"$(_SQLITE_UTILS_COMPLETE=bash_source sqlite-utils)\"\r\n\r\nNeed to add this to the installation docs here: https://sqlite-utils.datasette.io/en/stable/installation.html - along with the pattern for adding that to `.zshrc` or whatever.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/552/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718607907, "node_id": "I_kwDOCGYnMM5mb-Aj", "number": 551, "title": "Make as many examples in the CLI docs as possible copy-and-pastable", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 6, "created_at": "2023-05-21T19:04:10Z", "updated_at": "2023-05-21T21:04:04Z", "closed_at": "2023-05-21T20:57:24Z", "author_association": "OWNER", "pull_request": null, "body": "e.g. in this section:\r\n\r\nhttps://sqlite-utils.datasette.io/en/stable/cli.html#running-queries-directly-against-csv-or-json\r\n\r\n\"image\"\r\n\r\nThe little copy button will also copy the `$ ` which breaks the examples when copied.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/551/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718635018, "node_id": "PR_kwDOCGYnMM5Q9lY4", "number": 553, "title": "Reformatted CLI examples in docs", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-05-21T20:44:34Z", "updated_at": "2023-05-21T20:57:27Z", "closed_at": "2023-05-21T20:57:23Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/553", "body": "Refs:\r\n- #551\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--553.org.readthedocs.build/en/553/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/553/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1718517882, "node_id": "I_kwDOCGYnMM5mboB6", "number": 545, "title": "Try out Trogon for a tui interface", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 6, "created_at": "2023-05-21T14:08:25Z", "updated_at": "2023-05-21T19:33:13Z", "closed_at": "2023-05-21T18:41:58Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/Textualize/trogon", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/545/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718595700, "node_id": "I_kwDOCGYnMM5mb7B0", "number": 550, "title": "AttributeError: 'EntryPoints' object has no attribute 'get' for flake8 on Python 3.7", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-05-21T18:24:39Z", "updated_at": "2023-05-21T18:42:25Z", "closed_at": "2023-05-21T18:41:58Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/actions/runs/5039064797/jobs/9036965488\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/bin/flake8\", line 8, in \r\n sys.exit(main())\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/main/cli.py\", line 22, in main\r\n app.run(argv)\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/main/application.py\", line 363, in run\r\n self._run(argv)\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/main/application.py\", line 350, in _run\r\n self.initialize(argv)\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/main/application.py\", line 330, in initialize\r\n self.find_plugins(config_finder)\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/main/application.py\", line 153, in find_plugins\r\n self.check_plugins = plugin_manager.Checkers(local_plugins.extension)\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/plugins/manager.py\", line 357, in __init__\r\n self.namespace, local_plugins=local_plugins\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/plugins/manager.py\", line 238, in __init__\r\n self._load_entrypoint_plugins()\r\n File \"/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/flake8/plugins/manager.py\", line 254, in _load_entrypoint_plugins\r\n eps = importlib_metadata.entry_points().get(self.namespace, ())\r\nAttributeError: 'EntryPoints' object has no attribute 'get'\r\nError: Process completed with exit code 1.\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/550/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718586377, "node_id": "PR_kwDOCGYnMM5Q9cAv", "number": 549, "title": "TUI powered by Trogon", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-05-21T17:55:42Z", "updated_at": "2023-05-21T18:42:00Z", "closed_at": "2023-05-21T18:41:56Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/549", "body": "Refs:\r\n- #545\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--549.org.readthedocs.build/en/549/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/549/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1718576761, "node_id": "I_kwDOCGYnMM5mb2Z5", "number": 548, "title": "analyze-tables should validate provide --column names", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-05-21T17:20:24Z", "updated_at": "2023-05-21T17:35:52Z", "closed_at": "2023-05-21T17:35:52Z", "author_association": "OWNER", "pull_request": null, "body": "Noticed this while testing:\r\n- #547 \r\n\r\nIf you pass a non-existent column to `-c/--column` you don't get an error message.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/548/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718572201, "node_id": "I_kwDOCGYnMM5mb1Sp", "number": 547, "title": "No need to show common values if everything is null", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-05-21T17:05:07Z", "updated_at": "2023-05-21T17:19:21Z", "closed_at": "2023-05-21T17:19:21Z", "author_association": "OWNER", "pull_request": null, "body": "Noticed this:\r\n\r\n```\r\n% sqlite-utils analyze-tables content.db repos -c delete_branch_on_merge --common-limit 20 --no-least\r\nrepos.delete_branch_on_merge: (1/1)\r\n\r\n Total rows: 158\r\n Null rows: 158\r\n Blank rows: 0\r\n\r\n Distinct values: 0\r\n\r\n Most common:\r\n 158: None\r\n```\r\n\r\nThe `158: None` there is duplicate information considering we already know there are 158/158 null rows.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/547/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718515590, "node_id": "I_kwDOCGYnMM5mbneG", "number": 544, "title": "New options for analyze-tables --common-limit --no-most and --no-least", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-05-21T14:03:19Z", "updated_at": "2023-05-21T17:03:06Z", "closed_at": "2023-05-21T16:19:31Z", "author_association": "OWNER", "pull_request": null, "body": "The \"least common\" section is frequently uninteresting, especially for huge tables with a large number of repeated-once values.\r\n\r\n sqlite-utils analyze-tables content.db repos --common-limit 20 --no-least", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/544/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1718550688, "node_id": "PR_kwDOCGYnMM5Q9VH0", "number": 546, "title": "Analyze tables options: --common-limit, --no-most, --no-least", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-05-21T15:54:39Z", "updated_at": "2023-05-21T16:19:30Z", "closed_at": "2023-05-21T16:19:30Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/546", "body": "Refs #544\r\n\r\n- [x] Documentation for CLI options\r\n- [x] Documentation for new Python API parameters: `most_common: bool` and `least_common: bool`\r\n- [x] Tests for CLI\r\n- [x] Tests for Python API", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/546/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1124731464, "node_id": "I_kwDOCGYnMM5DCgpI", "number": 399, "title": "Make it easier to insert geometries, with documentation and maybe code", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 25, "created_at": "2022-02-05T00:11:26Z", "updated_at": "2023-05-16T03:11:52Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "In playing with the new SpatiaLite helpers from #385 I noticed that actually populating geometry columns is still a little bit tricky. Here's what I ended up doing:\r\n\r\n```python\r\nimport httpx, sqlite_utils\r\ndb = sqlite_utils.Database(\"/tmp/spatial.db\")\r\nattractions = httpx.get(\"https://latest.datasette.io/fixtures/roadside_attractions.json?_shape=array\").json()\r\ndb[\"attractions\"].insert_all(attractions, pk=\"pk\")\r\n\r\n# Schema of that table is now:\r\n# CREATE TABLE [attractions] (\r\n# [pk] INTEGER PRIMARY KEY,\r\n# [name] TEXT,\r\n# [address] TEXT,\r\n# [latitude] FLOAT,\r\n# [longitude] FLOAT\r\n# )\r\n\r\ndb.init_spatialite()\r\ndb[\"attractions\"].add_geometry_column(\"point\", \"POINT\")\r\n\r\ndb.execute(\"\"\"\r\n update attractions set point = GeomFromText(\r\n 'POINT(' || longitude || ' ' || latitude || ')', 4326\r\n )\r\n\"\"\")\r\n```\r\nThat last line took some figuring out - especially the need for the SRID of `4326`, without which I got this error:\r\n\r\n> `IntegrityError: attractions.point violates Geometry constraint [geom-type or SRID not allowed]`\r\n\r\nIt would be good to both document this in more detail, but ideally also to come up with a more obvious pattern for inserting common types of spatial data.\r\n\r\nAlso related:\r\n- #398\r\n- #79", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/399/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1701018909, "node_id": "I_kwDOCGYnMM5lY30d", "number": 543, "title": "Tests broken on Windows due to new convert() lambda names", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2023-05-08T22:11:29Z", "updated_at": "2023-05-08T22:19:04Z", "closed_at": "2023-05-08T22:19:04Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/actions/runs/4920084038/jobs/8788501314\r\n```python\r\nsql = 'update [example] set [dt] = lambda_-9223371942137158589([dt]);'\r\n```\r\nFrom:\r\n- #526", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/543/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1516644980, "node_id": "I_kwDOCGYnMM5aZip0", "number": 520, "title": "rows_from_file() raises confusing error if file-like object is not in binary mode", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2023-01-02T19:00:14Z", "updated_at": "2023-05-08T22:08:07Z", "closed_at": "2023-05-08T22:08:07Z", "author_association": "OWNER", "pull_request": null, "body": "I got this error:\r\n\r\n```\r\n File \"/Users/simon/Dropbox/Development/openai-to-sqlite/openai_to_sqlite/cli.py\", line 27, in embeddings\r\n rows, _ = rows_from_file(input)\r\n ^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/simon/.local/share/virtualenvs/openai-to-sqlite-jt4obeb2/lib/python3.11/site-packages/sqlite_utils/utils.py\", line 305, in rows_from_file\r\n first_bytes = buffered.peek(2048).strip()\r\n ^^^^^^^^^^^^^^^^^^^\r\n```\r\nFrom this code:\r\n```python\r\n\r\n@cli.command()\r\n@click.argument(\r\n \"db_path\",\r\n type=click.Path(file_okay=True, dir_okay=False, allow_dash=False),\r\n)\r\n@click.option(\r\n \"-i\",\r\n \"--input\",\r\n type=click.File(\"r\"),\r\n default=\"-\",\r\n)\r\ndef embeddings(db_path, input):\r\n \"Store embeddings for one or more text documents\"\r\n click.echo(\"Here is some output\")\r\n db = sqlite_utils.Database(db_path)\r\n rows, _ = rows_from_file(input)\r\n print(list(rows))\r\n```\r\nThe error went away when I changed it to `type=click.File(\"rb\")`.\r\n\r\nThis should either be called out in the documentation or `rows_from_file()` should be fixed to handle text-mode files in addition to binary files.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/520/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1700936245, "node_id": "I_kwDOCGYnMM5lYjo1", "number": 542, "title": "Remove `skip_false=True` and `--no-skip-false` in `sqlite-utils` 4.0", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": {"value": 9374594, "label": "4.0 backwards incomatible changes"}, "comments": 1, "created_at": "2023-05-08T21:04:28Z", "updated_at": "2023-05-08T21:07:41Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Following:\r\n- #527\r\n\r\nThe only reason I didn't remove fix this mis-feature entirely is that it represents a backwards incompatible change. I'll make that change in 4.0.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/542/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1700840265, "node_id": "I_kwDOCGYnMM5lYMNJ", "number": 541, "title": "Get tests to pass with `pytest -Werror`", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2023-05-08T19:57:23Z", "updated_at": "2023-05-08T19:59:35Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Inspired by:\r\n- #534", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/541/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1699184583, "node_id": "I_kwDOCGYnMM5lR3_H", "number": 540, "title": "sphinx.builders.linkcheck build error", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2023-05-07T18:37:09Z", "updated_at": "2023-05-08T04:56:13Z", "closed_at": "2023-05-07T18:42:36Z", "author_association": "OWNER", "pull_request": null, "body": "https://readthedocs.org/projects/sqlite-utils/builds/20512693/\r\n```\r\n Running Sphinx v6.2.1\r\n\r\nTraceback (most recent call last):\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/sphinx/registry.py\", line 442, in load_extension\r\n mod = import_module(extname)\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/importlib/__init__.py\", line 127, in import_module\r\n return _bootstrap._gcd_import(name[level:], package, level)\r\n File \"\", line 1014, in _gcd_import\r\n File \"\", line 991, in _find_and_load\r\n File \"\", line 975, in _find_and_load_unlocked\r\n File \"\", line 671, in _load_unlocked\r\n File \"\", line 783, in exec_module\r\n File \"\", line 219, in _call_with_frames_removed\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/sphinx/builders/linkcheck.py\", line 20, in \r\n from requests import Response\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/requests/__init__.py\", line 43, in \r\n import urllib3\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/urllib3/__init__.py\", line 38, in \r\n raise ImportError(\r\nImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2n 7 Dec 2017. See: https://github.com/urllib3/urllib3/issues/2168\r\n\r\nThe above exception was the direct cause of the following exception:\r\n\r\nTraceback (most recent call last):\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/sphinx/cmd/build.py\", line 280, in build_main\r\n app = Sphinx(args.sourcedir, args.confdir, args.outputdir,\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/sphinx/application.py\", line 225, in __init__\r\n self.setup_extension(extension)\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/sphinx/application.py\", line 404, in setup_extension\r\n self.registry.load_extension(self, extname)\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/latest/lib/python3.8/site-packages/sphinx/registry.py\", line 445, in load_extension\r\n raise ExtensionError(__('Could not import extension %s') % extname,\r\nsphinx.errors.ExtensionError: Could not import extension sphinx.builders.linkcheck (exception: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2n 7 Dec 2017. See: https://github.com/urllib3/urllib3/issues/2168)\r\n\r\nExtension error:\r\nCould not import extension sphinx.builders.linkcheck (exception: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with OpenSSL 1.0.2n 7 Dec 2017. See: https://github.com/urllib3/urllib3/issues/2168)\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/540/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1699174055, "node_id": "I_kwDOCGYnMM5lR1an", "number": 539, "title": "`--raw-lines` option, like `--raw` for multiple lines", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2023-05-07T18:07:46Z", "updated_at": "2023-05-07T18:43:24Z", "closed_at": "2023-05-07T18:26:18Z", "author_association": "OWNER", "pull_request": null, "body": "I wanted to output newline-separated output of the first column of every row in the results - like `--row` but for more than one line.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/539/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1203842656, "node_id": "I_kwDOCGYnMM5HwS5g", "number": 425, "title": "`sqlite3.NotSupportedError`: deterministic=True requires SQLite 3.8.3 or higher", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 5, "created_at": "2022-04-13T22:16:53Z", "updated_at": "2023-04-15T20:14:58Z", "closed_at": "2022-04-13T22:48:57Z", "author_association": "OWNER", "pull_request": null, "body": "Got this error while investigating:\r\n- #421\r\n\r\nEven though I was using the `LD_PRELOAD` trick from https://til.simonwillison.net/sqlite/ld-preload to use a newer version of SQLite.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/421#issuecomment-1098531354_", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/425/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1114543475, "node_id": "I_kwDOCGYnMM5CbpVz", "number": 388, "title": "Link to stable docs from older versions", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 7, "created_at": "2022-01-26T01:55:46Z", "updated_at": "2023-03-26T23:43:12Z", "closed_at": "2022-01-26T02:00:22Z", "author_association": "OWNER", "pull_request": null, "body": "https://sqlite-utils.datasette.io/en/2.14.1/ isn't showing a link to the stable release right now.\r\n\r\nI should also apply the same fix I used for Datasette in:\r\n- https://github.com/simonw/datasette/issues/1608\r\n\r\nTIL: https://til.simonwillison.net/readthedocs/link-from-latest-to-stable", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/388/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1620516340, "node_id": "I_kwDOCGYnMM5glx30", "number": 533, "title": "ReadTheDocs error: not all arguments converted during string formatting", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2023-03-12T21:21:05Z", "updated_at": "2023-03-12T21:25:33Z", "closed_at": "2023-03-12T21:25:33Z", "author_association": "OWNER", "pull_request": null, "body": "This came up as a failure running tests for:\r\n- #531\r\n\r\nTraceback on https://readthedocs.org/projects/sqlite-utils/builds/19749348/\r\n\r\n```\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/531/lib/python3.8/site-packages/docutils/parsers/rst/states.py\", line 889, in interpreted\r\n nodes, messages2 = role_fn(role, rawsource, text, lineno, self)\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/531/lib/python3.8/site-packages/sphinx/ext/extlinks.py\", line 103, in role\r\n title = caption % part\r\nTypeError: not all arguments converted during string formatting\r\n\r\nException occurred:\r\n File \"/home/docs/checkouts/readthedocs.org/user_builds/sqlite-utils/envs/531/lib/python3.8/site-packages/sphinx/ext/extlinks.py\", line 103, in role\r\n title = caption % part\r\nTypeError: not all arguments converted during string formatting\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/533/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1373224657, "node_id": "I_kwDOCGYnMM5R2b7R", "number": 488, "title": "`sqlite-utils transform` should set empty strings to null when converting text columns to integer/float", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 5, "created_at": "2022-09-14T15:51:30Z", "updated_at": "2022-12-23T17:38:55Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "```\r\n/tmp % echo \"id,age,weight\\n1,3,2.5\\n2,,\" | sqlite-utils insert test.db test - --csv\r\n/tmp % sqlite-utils schema test.db \r\nCREATE TABLE [test] (\r\n [id] TEXT,\r\n [age] TEXT,\r\n [weight] TEXT\r\n);\r\n/tmp % sqlite-utils transform test.db test --type age integer --type weight float \r\n/tmp % sqlite-utils schema test.db \r\nCREATE TABLE \"test\" (\r\n [id] TEXT,\r\n [age] INTEGER,\r\n [weight] FLOAT\r\n);\r\n/tmp % sqlite-utils rows test.db test\r\n[{\"id\": \"1\", \"age\": 3, \"weight\": 2.5},\r\n {\"id\": \"2\", \"age\": \"\", \"weight\": \"\"}]\r\n```\r\nIt would be neat if this resulted in the following instead:\r\n```\r\n {\"id\": \"2\", \"age\": null, \"weight\": null}\r\n```\r\nRelated Discord discussion: https://discord.com/channels/823971286308356157/823971286941302908/1019635490833567794", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/488/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1487764628, "node_id": "I_kwDOCGYnMM5YrXyU", "number": 518, "title": "flake8 ValueError: Error code '#' supplied to 'extend-ignore' option...", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2022-12-10T01:30:24Z", "updated_at": "2022-12-10T01:36:46Z", "closed_at": "2022-12-10T01:36:46Z", "author_association": "OWNER", "pull_request": null, "body": "> `Error code '#' supplied to 'extend-ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'`\r\n\r\nhttps://github.com/simonw/sqlite-utils/actions/runs/3662011265/jobs/6190770361\r\n\r\nI think from this:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/e660635cea6c32f4022818380b1e1ee88e7c93a6/setup.cfg#L1-L3\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/518/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1487757143, "node_id": "I_kwDOCGYnMM5YrV9X", "number": 517, "title": "Drop support for Python 3.6", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-12-10T01:23:31Z", "updated_at": "2022-12-10T01:36:36Z", "closed_at": "2022-12-10T01:36:36Z", "author_association": "OWNER", "pull_request": null, "body": "CI has started failing for Python 3.6: https://github.com/simonw/sqlite-utils/actions/runs/3576322798\r\n\r\n\"image\"\r\n\r\nIt's fixable by swiching away from `ubuntu-latest` according to:\r\n\r\n- https://github.com/actions/setup-python/issues/355#issuecomment-1335042510\r\n\r\nBut https://endoflife.date/python says that 3.6 end of life was almost 6 years ago, and end of security support nearly 1 year ago.\r\n\r\nSo I'm OK dropping support entirely - Python 3.6 users will still be able to install version 3.30, just not any releases that come next.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/517/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1479914599, "node_id": "I_kwDOCGYnMM5YNbRn", "number": 516, "title": "Feature request: output number of ignored/replaced rows for insert command", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2022-12-06T18:59:21Z", "updated_at": "2022-12-06T19:08:14Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "https://hachyderm.io/@briandorsey/109468185742876820\r\n\r\n> I'm fiddling with piping json to `insert -ignore` I'd love to see the count of records inserted & ignored, but didn't see a way to do that in the help/docs.\r\n>\r\n> Example: `xh \"https://hachyderm.io/api/v1/timelines/tag/rust?max_id=109443380308326328\" | sqlite-utils insert aoc.db aoc - --pk=id --ignore`", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/516/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1450952393, "node_id": "I_kwDOCGYnMM5We8bJ", "number": 512, "title": "mypy failures in CI", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2022-11-16T06:22:48Z", "updated_at": "2022-11-16T07:49:51Z", "closed_at": "2022-11-16T07:49:50Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/actions/runs/3472012235 failed on Python 3.11:\r\n\r\nTruncated output:\r\n```\r\nsqlite_utils/db.py:2467: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True\r\nsqlite_utils/db.py:2467: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase\r\nsqlite_utils/db.py:2530: error: Incompatible default for argument \"where\" (default has type \"None\", argument has type \"str\") [assignment]\r\nsqlite_utils/db.py:2530: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True\r\nsqlite_utils/db.py:2530: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase\r\nsqlite_utils/db.py:2658: error: Argument 1 to \"count_where\" of \"Queryable\" has incompatible type \"Optional[str]\"; expected \"str\" [arg-type]\r\nFound 23 errors in 1 file (checked 51 source files)\r\n```\r\nBest look at https://github.com/hauntsaninja/no_implicit_optional", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/512/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 473083260, "node_id": "MDU6SXNzdWU0NzMwODMyNjA=", "number": 50, "title": "\"Too many SQL variables\" on large inserts", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2019-07-25T21:43:31Z", "updated_at": "2022-11-04T14:38:36Z", "closed_at": "2019-07-28T11:59:33Z", "author_association": "OWNER", "pull_request": null, "body": "Reported here: https://github.com/dogsheep/healthkit-to-sqlite/issues/9\r\n\r\nIt looks like there's a default limit of 999 variables - we need to be smart about that, maybe dynamically lower the batch size based on the number of columns.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/50/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1429029604, "node_id": "I_kwDOCGYnMM5VLULk", "number": 506, "title": "Make `cursor.rowcount` accessible (wontfix)", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2022-10-30T21:51:55Z", "updated_at": "2022-11-01T17:37:47Z", "closed_at": "2022-11-01T17:37:13Z", "author_association": "OWNER", "pull_request": null, "body": "In building this Datasette feature on top of `sqlite-utils` I thought it might be useful to expose the number of rows that had been affected by a bulk insert or update - the `cursor.rowcount`:\r\n\r\n- https://github.com/simonw/datasette/issues/1866\r\n\r\nThis isn't currently exposed by `sqlite-utils`.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/506/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1423182778, "node_id": "I_kwDOCGYnMM5U1Au6", "number": 505, "title": "Release sqlite-utils 3.30", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-10-25T22:20:05Z", "updated_at": "2022-10-25T22:41:26Z", "closed_at": "2022-10-25T22:41:16Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/compare/3.29...defa2974c6d3abc19be28d6b319649b8028dc966", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/505/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1386562662, "node_id": "I_kwDOCGYnMM5SpURm", "number": 493, "title": "Tiny typographical error in install/uninstall docs", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2022-09-26T19:00:42Z", "updated_at": "2022-10-25T21:31:15Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Added in:\r\n- #483\r\n\r\nI don't know how to fix this in Sphinx: I'm getting this: https://sqlite-utils.datasette.io/en/latest/cli.html#cli-install\r\n\r\n> The [insert \u2013convert](https://sqlite-utils.datasette.io/en/latest/cli.html#cli-insert-convert) and [query \u2013functions](https://sqlite-utils.datasette.io/en/latest/cli.html#cli-query-functions) options\r\n\r\n\"image\"\r\n\r\nBut I want it to display `insert --convert` and not `insert \u2013convert` there.\r\n\r\nHere's the code: https://github.com/simonw/sqlite-utils/blob/85247038f70d7eb2f3e272cfeaa4c44459cafba8/docs/cli.rst#L2125", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/493/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1423069384, "node_id": "I_kwDOCGYnMM5U0lDI", "number": 504, "title": "db.close() method, calling db.conn.close()", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-10-25T20:50:50Z", "updated_at": "2022-10-25T21:00:29Z", "closed_at": "2022-10-25T20:57:47Z", "author_association": "OWNER", "pull_request": null, "body": "I ended up needing to use `db.conn.close()` to fix this issue:\r\n- #503\r\n\r\nI think `.close()` should be a method on `Database` itself.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/504/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1423000702, "node_id": "I_kwDOCGYnMM5U0UR-", "number": 503, "title": "test_recreate failing on Windows Python 3.11", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 10, "created_at": "2022-10-25T20:01:41Z", "updated_at": "2022-10-25T20:47:34Z", "closed_at": "2022-10-25T20:45:43Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/actions/runs/3323672128/jobs/5494726927\r\n\r\nRelated:\r\n- #502\r\n\r\n```\r\nFAILED tests/test_recreate.py::test_recreate[True-True] - \r\n PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:\r\n 'C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\Temp\\\\pytest-of-runneradmin\\\\pytest-0\\\\test_recreate_True_True_0\\\\data.db'\r\nFAILED tests/test_recreate.py::test_recreate[False-True] - \r\n PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:\r\n 'C:\\\\Users\\\\runneradmin\\\\AppData\\\\Local\\\\Temp\\\\pytest-of-runneradmin\\\\pytest-0\\\\test_recreate_False_True_0\\\\data.db'\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/503/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1422954582, "node_id": "I_kwDOCGYnMM5U0JBW", "number": 502, "title": "Fix tests for Python 3.11", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-10-25T19:20:31Z", "updated_at": "2022-10-25T19:23:47Z", "closed_at": "2022-10-25T19:23:47Z", "author_association": "OWNER", "pull_request": null, "body": "The way errors are represented has changed: https://github.com/simonw/sqlite-utils/actions/runs/3323588047/jobs/5494127154\r\n```\r\n_________________________ test_query_invalid_function __________________________\r\n\r\ndb_path = '/tmp/pytest-of-runner/pytest-0/test_query_invalid_function0/test.db'\r\n\r\n def test_query_invalid_function(db_path):\r\n result = CliRunner().invoke(\r\n cli.cli, [db_path, \"select bad()\", \"--functions\", \"def invalid_python\"]\r\n )\r\n assert result.exit_code == 1\r\n> assert (\r\n result.output.strip()\r\n == \"Error: Error in functions definition: invalid syntax (, line 1)\"\r\n )\r\nE AssertionError: assert 'Error: Error...ing>, line 1)' == 'Error: Error...ing>, line 1)'\r\nE - Error: Error in functions definition: invalid syntax (, line 1)\r\nE ? ^^^^^^ ^^^^^^\r\nE + Error: Error in functions definition: expected '(' (, line 1)\r\nE ? ^^^^^^^ ^^^\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/502/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1413641049, "node_id": "I_kwDOCGYnMM5UQnNZ", "number": 501, "title": "Tests failing due to updated tabulate library", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2022-10-18T18:07:52Z", "updated_at": "2022-10-18T18:23:40Z", "closed_at": "2022-10-18T18:23:40Z", "author_association": "OWNER", "pull_request": null, "body": "Failure here: https://github.com/simonw/sqlite-utils/actions/runs/3275786702/jobs/5391063221\r\n\r\nI figured out the problem:\r\n\r\n```diff\r\ndiff --git a/docs/cli-reference.rst b/docs/cli-reference.rst\r\nindex b88e38a..82b4b6c 100644\r\n--- a/docs/cli-reference.rst\r\n+++ b/docs/cli-reference.rst\r\n@@ -112,11 +112,15 @@ See :ref:`cli_query`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst,\r\n- simple, textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira,\r\n+ latex, latex_booktabs, latex_longtable, latex_raw,\r\n+ mediawiki, mixed_grid, mixed_outline, moinmoin,\r\n+ orgtbl, outline, pipe, plain, presto, pretty,\r\n+ psql, rounded_grid, rounded_outline, rst, simple,\r\n+ simple_grid, simple_outline, textile, tsv,\r\n+ unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not\r\n escaped strings\r\n -r, --raw Raw output, first column of first row\r\n@@ -176,11 +180,15 @@ See :ref:`cli_memory`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst,\r\n- simple, textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira,\r\n+ latex, latex_booktabs, latex_longtable, latex_raw,\r\n+ mediawiki, mixed_grid, mixed_outline, moinmoin,\r\n+ orgtbl, outline, pipe, plain, presto, pretty,\r\n+ psql, rounded_grid, rounded_outline, rst, simple,\r\n+ simple_grid, simple_outline, textile, tsv,\r\n+ unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not\r\n escaped strings\r\n -r, --raw Raw output, first column of first row\r\n@@ -401,11 +409,14 @@ See :ref:`cli_search`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst, simple,\r\n- textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira, latex,\r\n+ latex_booktabs, latex_longtable, latex_raw, mediawiki,\r\n+ mixed_grid, mixed_outline, moinmoin, orgtbl, outline,\r\n+ pipe, plain, presto, pretty, psql, rounded_grid,\r\n+ rounded_outline, rst, simple, simple_grid,\r\n+ simple_outline, textile, tsv, unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not escaped\r\n strings\r\n --load-extension TEXT Path to SQLite extension, with optional :entrypoint\r\n@@ -651,11 +662,14 @@ See :ref:`cli_tables`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst, simple,\r\n- textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira, latex,\r\n+ latex_booktabs, latex_longtable, latex_raw, mediawiki,\r\n+ mixed_grid, mixed_outline, moinmoin, orgtbl, outline,\r\n+ pipe, plain, presto, pretty, psql, rounded_grid,\r\n+ rounded_outline, rst, simple, simple_grid,\r\n+ simple_outline, textile, tsv, unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not escaped\r\n strings\r\n --columns Include list of columns for each table\r\n@@ -689,11 +703,14 @@ See :ref:`cli_views`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst, simple,\r\n- textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira, latex,\r\n+ latex_booktabs, latex_longtable, latex_raw, mediawiki,\r\n+ mixed_grid, mixed_outline, moinmoin, orgtbl, outline,\r\n+ pipe, plain, presto, pretty, psql, rounded_grid,\r\n+ rounded_outline, rst, simple, simple_grid,\r\n+ simple_outline, textile, tsv, unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not escaped\r\n strings\r\n --columns Include list of columns for each view\r\n@@ -732,11 +749,15 @@ See :ref:`cli_rows`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst,\r\n- simple, textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira,\r\n+ latex, latex_booktabs, latex_longtable, latex_raw,\r\n+ mediawiki, mixed_grid, mixed_outline, moinmoin,\r\n+ orgtbl, outline, pipe, plain, presto, pretty,\r\n+ psql, rounded_grid, rounded_outline, rst, simple,\r\n+ simple_grid, simple_outline, textile, tsv,\r\n+ unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not\r\n escaped strings\r\n --load-extension TEXT Path to SQLite extension, with optional\r\n@@ -768,11 +789,14 @@ See :ref:`cli_triggers`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst, simple,\r\n- textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira, latex,\r\n+ latex_booktabs, latex_longtable, latex_raw, mediawiki,\r\n+ mixed_grid, mixed_outline, moinmoin, orgtbl, outline,\r\n+ pipe, plain, presto, pretty, psql, rounded_grid,\r\n+ rounded_outline, rst, simple, simple_grid,\r\n+ simple_outline, textile, tsv, unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not escaped\r\n strings\r\n --load-extension TEXT Path to SQLite extension, with optional :entrypoint\r\n@@ -804,11 +828,14 @@ See :ref:`cli_indexes`.\r\n --tsv Output TSV\r\n --no-headers Omit CSV headers\r\n -t, --table Output as a formatted table\r\n- --fmt TEXT Table format - one of fancy_grid, fancy_outline,\r\n- github, grid, html, jira, latex, latex_booktabs,\r\n- latex_longtable, latex_raw, mediawiki, moinmoin,\r\n- orgtbl, pipe, plain, presto, pretty, psql, rst, simple,\r\n- textile, tsv, unsafehtml, youtrack\r\n+ --fmt TEXT Table format - one of asciidoc, double_grid,\r\n+ double_outline, fancy_grid, fancy_outline, github,\r\n+ grid, heavy_grid, heavy_outline, html, jira, latex,\r\n+ latex_booktabs, latex_longtable, latex_raw, mediawiki,\r\n+ mixed_grid, mixed_outline, moinmoin, orgtbl, outline,\r\n+ pipe, plain, presto, pretty, psql, rounded_grid,\r\n+ rounded_outline, rst, simple, simple_grid,\r\n+ simple_outline, textile, tsv, unsafehtml, youtrack\r\n --json-cols Detect JSON cols and output them as JSON, not escaped\r\n strings\r\n --load-extension TEXT Path to SQLite extension, with optional :entrypoint\r\ndiff --git a/docs/cli.rst b/docs/cli.rst\r\nindex 8bc4176..1d67e88 100644\r\n--- a/docs/cli.rst\r\n+++ b/docs/cli.rst\r\n@@ -187,10 +187,15 @@ Available ``--fmt`` options are:\r\n cog.out(\"\\n\" + \"\\n\".join('- ``{}``'.format(t) for t in tabulate.tabulate_formats) + \"\\n\\n\")\r\n .. ]]]\r\n \r\n+- ``asciidoc``\r\n+- ``double_grid``\r\n+- ``double_outline``\r\n - ``fancy_grid``\r\n - ``fancy_outline``\r\n - ``github``\r\n - ``grid``\r\n+- ``heavy_grid``\r\n+- ``heavy_outline``\r\n - ``html``\r\n - ``jira``\r\n - ``latex``\r\n@@ -198,15 +203,22 @@ Available ``--fmt`` options are:\r\n - ``latex_longtable``\r\n - ``latex_raw``\r\n - ``mediawiki``\r\n+- ``mixed_grid``\r\n+- ``mixed_outline``\r\n - ``moinmoin``\r\n - ``orgtbl``\r\n+- ``outline``\r\n - ``pipe``\r\n - ``plain``\r\n - ``presto``\r\n - ``pretty``\r\n - ``psql``\r\n+- ``rounded_grid``\r\n+- ``rounded_outline``\r\n - ``rst``\r\n - ``simple``\r\n+- ``simple_grid``\r\n+- ``simple_outline``\r\n - ``textile``\r\n - ``tsv``\r\n - ``unsafehtml``\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/501/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1413610718, "node_id": "I_kwDOCGYnMM5UQfze", "number": 500, "title": "Turn --flatten into a documented utility function", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2022-10-18T17:43:36Z", "updated_at": "2022-10-18T18:02:10Z", "closed_at": "2022-10-18T18:00:40Z", "author_association": "OWNER", "pull_request": null, "body": "The `--flatten` implementation isn't currently available to Python code - people have to roll their own implementation. Feedback from a conversation at DjangoCon.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/500/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1149661489, "node_id": "I_kwDOCGYnMM5EhnEx", "number": 409, "title": "`with db:` for transactions", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2022-02-24T19:22:06Z", "updated_at": "2022-10-01T03:42:50Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "This can be a documented wrapper around `with db.conn:`.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/409/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1386593843, "node_id": "I_kwDOCGYnMM5Spb4z", "number": 494, "title": "Document how to use Just", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-09-26T19:25:12Z", "updated_at": "2022-09-26T19:32:36Z", "closed_at": "2022-09-26T19:26:39Z", "author_association": "OWNER", "pull_request": null, "body": "I'm using `just` a lot know, based on this file - I should add that to https://sqlite-utils.datasette.io/en/latest/contributing.html\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/afbd2b2cba45cccb305c3d4638d18db4dd3d4bbd/Justfile#L1-L24", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/494/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1363765916, "node_id": "I_kwDOCGYnMM5RSWqc", "number": 483, "title": "`sqlite-utils install` command", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-09-06T20:13:55Z", "updated_at": "2022-09-26T19:04:43Z", "closed_at": "2022-09-26T18:57:15Z", "author_association": "OWNER", "pull_request": null, "body": "With the addition of `--functions` in:\r\n- #471\r\n\r\nIn addition to the existing `convert` command, there are now very good reasons to want to install additional packages into the same virtual environment as `sqlite-utils` itself, to allow them to be used with those features.\r\n\r\nThis isn't easy if you installed the tool with `pipx` or `brew install sqlite-utils`.\r\n\r\nDatasette solved this problem with the `datasette install` command:\r\n\r\n- https://github.com/simonw/datasette/issues/925\r\n\r\n`sqlite-utils` could benefit from the same idea.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/483/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1386530156, "node_id": "I_kwDOCGYnMM5SpMVs", "number": 492, "title": "Idea: ability to pass extra variables to `--convert` scripts", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-09-26T18:30:45Z", "updated_at": "2022-09-26T18:33:19Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Got this idea from this example in https://jeqo.github.io/notes/2022-09-24-ingest-logs-sqlite/\r\n\r\n```bash\r\nsqlite-utils insert /tmp/kafka-logs.db logs server.log.2022-09-24-21 --text --convert \"\r\nimport re\r\nr = re.compile(r'^\\[(?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3})\\] (?P\\w+) (?P(.+(\\n(?\\!\\[).+|)+))', re.MULTILINE)\r\ndef convert(text):\r\n rows = [m.groupdict() for m in r.finditer(text)]\r\n for row in rows:\r\n row.update({'server': 'localhost'})\r\n row.update({'component': 'broker'})\r\n return rows\r\n\"\r\n```\r\nAnd the accompanying note:\r\n\r\n> The `row.update` allows to label rows as I\u2019m planning to ingest logs from different hosts and potentially different components.\r\n\r\nThis made me think: it might be neat if you could inject additional variable values into that script with extra command-line options, to make this kind of reuse easier. Something like this:\r\n\r\n```bash\r\nsqlite-utils insert /tmp/kafka-logs.db logs server.log.2022-09-24-21 --text --convert \"\r\nimport re\r\nr = re.compile(r'^\\[(?P\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3})\\] (?P\\w+) (?P(.+(\\n(?\\!\\[).+|)+))', re.MULTILINE)\r\ndef convert(text):\r\n rows = [m.groupdict() for m in r.finditer(text)]\r\n for row in rows:\r\n row.update({'server': server})\r\n row.update({'component': component})\r\n return rows\r\n\" --var server \"localhost\" --var component \"broker\"\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/492/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1374939463, "node_id": "I_kwDOCGYnMM5R8-lH", "number": 489, "title": "Ability to load JSON records held in a file with a single top level key that is a list of objects", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 9, "created_at": "2022-09-15T18:46:03Z", "updated_at": "2022-09-15T20:56:10Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "It's very common for JSON to look like this:\r\n```json\r\n{\r\n \"Version\": \"5.5.52.6\",\r\n \"List\": [\r\n {\r\n \"Description\": \"Nonpartisan\",\r\n \"Id\": 1,\r\n \"ExternalId\": \"\"\r\n },\r\n {\r\n \"Description\": \"Undeclared\",\r\n \"Id\": 2,\r\n \"ExternalId\": \"\"\r\n }\r\n ]\r\n}\r\n```\r\nThis example taken from the records downloaded from https://www.elections.alaska.gov/election-results/e/\r\n\r\nRight now you can't import this into `sqlite-utils` - you need to run it through `jq .List` first.\r\n\r\nBut since this is so common, it would be neat if `sqlite-utils` could have a rule of thumb that says \"if it's an object, but it has a single key that is is a list of objects, use that instead\".", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/489/reactions\", \"total_count\": 2, \"+1\": 2, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1363766973, "node_id": "I_kwDOCGYnMM5RSW69", "number": 484, "title": "Expose convert recipes to `sqlite-utils --functions`", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 11, "created_at": "2022-09-06T20:15:08Z", "updated_at": "2022-09-07T19:09:52Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "`--functions` was added in:\r\n- #471 \r\n\r\nIt would be useful if the `r.jsonsplit()` and similar recipes for `sqlite-utils convert` could be used in these blocks of code too: https://sqlite-utils.datasette.io/en/stable/cli.html#sqlite-utils-convert-recipes", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/484/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1352932716, "node_id": "I_kwDOCGYnMM5QpB1s", "number": 471, "title": "sqlite-utils query --functions mechanism for registering extra functions", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 12, "created_at": "2022-08-27T03:57:53Z", "updated_at": "2022-09-07T03:46:26Z", "closed_at": "2022-08-27T05:10:57Z", "author_association": "OWNER", "pull_request": null, "body": "It would be really cool if you could register additional custom SQL functions for use with the `sqlite-utils query` command - something like this:\r\n\r\n```\r\nsqlite-utils data.db 'update images set domain = extract_domain(url)' --functions '\r\nfrom urllib.parse import urlparse\r\n\r\ndef extract_domain(url):\r\n return urlparse(url).netloc\r\n'\r\n```\r\nEvery function defined in that code block would be registered with the connection, unless the name began with an underscore.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/471/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 816526538, "node_id": "MDU6SXNzdWU4MTY1MjY1Mzg=", "number": 239, "title": "sqlite-utils extract could handle nested objects", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 16, "created_at": "2021-02-25T15:10:28Z", "updated_at": "2022-09-03T23:46:02Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Imagine a table (imported from a nested JSON file) where one of the columns contains values that look like this:\r\n\r\n {\"email\": \"anonymous@noreply.airtable.com\", \"id\": \"usrROSHARE0000000\", \"name\": \"Anonymous\"}\r\n\r\nThe `sqlite-utils extract` command already uses single text values in a column to populate a new table. It would not be much of a stretch for it to be able to use JSON instead, including specifying which of those values should be used as the primary key in the new table.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/239/reactions\", \"total_count\": 6, \"+1\": 5, \"-1\": 0, \"laugh\": 0, \"hooray\": 1, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1359604075, "node_id": "I_kwDOCGYnMM5RCelr", "number": 481, "title": "Idea: `sqlite-utils create-table tablename --sql \"select ...\"`", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2022-09-02T01:41:24Z", "updated_at": "2022-09-02T01:42:08Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "Could offer syntactic sugar for:\r\n\r\n```sql\r\ncreate table foo as select * from bar\r\n```\r\n\r\n```\r\nsqlite-utils create-table data.db foo --sql \"select * from bar\"\r\n```\r\nhttps://sqlite-utils.datasette.io/en/stable/cli-reference.html#create-table", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/481/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1353481513, "node_id": "I_kwDOCGYnMM5QrH0p", "number": 478, "title": "`sqlite-utils tables data.db table1 table2`", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-08-28T22:05:53Z", "updated_at": "2022-08-28T22:22:35Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "The `sqlite-utils tables` command currently lists all tables.\r\n\r\nIf you have a huge table in there then running it with `--counts` can get expensive, because of the huge table.\r\n\r\nWould be useful if it could accept an optional list of tables that it should execute against, as an alternative to the default of all of them.\r\n\r\nThis should be a backwards compatible change. Current design is: https://sqlite-utils.datasette.io/en/stable/cli-reference.html#tables\r\n\r\n```\r\nUsage: sqlite-utils tables [OPTIONS] PATH\r\n\r\n List the tables in the database\r\n\r\n Example:\r\n\r\n sqlite-utils tables trees.db\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/478/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1353196970, "node_id": "I_kwDOCGYnMM5QqCWq", "number": 476, "title": "Release notes for 3.29", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 2, "created_at": "2022-08-27T23:21:21Z", "updated_at": "2022-08-28T04:07:15Z", "closed_at": "2022-08-28T04:07:03Z", "author_association": "OWNER", "pull_request": null, "body": "https://github.com/simonw/sqlite-utils/compare/3.28...104f37fa4d2e7e5999c1d829267b62c737f74d3e", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/476/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1348169997, "node_id": "I_kwDOCGYnMM5QW3EN", "number": 467, "title": "Mechanism for ensuring a table has all the columns", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 13, "created_at": "2022-08-23T15:50:23Z", "updated_at": "2022-08-27T23:19:41Z", "closed_at": "2022-08-27T23:17:56Z", "author_association": "OWNER", "pull_request": null, "body": "Suggested by @jefftriplett on Discord: https://discord.com/channels/823971286308356157/997738192360964156/1011655389063958600", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/467/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1348294436, "node_id": "PR_kwDOCGYnMM49qP2V", "number": 468, "title": "db[table].create(..., transform=True) and create-table --transform", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 6, "created_at": "2022-08-23T17:27:58Z", "updated_at": "2022-08-27T23:17:55Z", "closed_at": "2022-08-27T23:17:55Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/468", "body": "Work in progress. Still needs documentation and tests (and to cover more cases of things that might have changed).\r\n\r\nRefs:\r\n- #467\r\n\r\n\r\n----\r\n:books: Documentation preview :books:: https://sqlite-utils--468.org.readthedocs.build/en/468/\r\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/468/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1353189941, "node_id": "I_kwDOCGYnMM5QqAo1", "number": 475, "title": "table.default_values introspection property", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 1, "created_at": "2022-08-27T22:33:31Z", "updated_at": "2022-08-27T22:44:46Z", "closed_at": "2022-08-27T22:43:02Z", "author_association": "OWNER", "pull_request": null, "body": "> Interesting challenge with `default_value`: I need to be able to tell if the default values passed to `.create()` differ from those in the database already.\r\n>\r\n> Introspecting that is a bit tricky:\r\n>\r\n> ```pycon\r\n> >>> import sqlite_utils\r\n> >>> db = sqlite_utils.Database(memory=True)\r\n> >>> db[\"blah\"].create({\"id\": int, \"name\": str}, not_null=(\"name\",), defaults={\"name\": \"bob\"})\r\n>
\r\n> >>> db[\"blah\"].columns\r\n> [Column(cid=0, name='id', type='INTEGER', notnull=0, default_value=None, is_pk=0), Column(cid=1, name='name', type='TEXT', notnull=1, default_value=\"'bob'\", is_pk=0)]\r\n> ```\r\n> Note how a default value of the Python string `bob` is represented in the results of `PRAGMA table_info()` as `default_value=\"'bob'\"` - it's got single quotes added to it!\r\n> \r\n> So comparing default values from introspecting the database needs me to first parse that syntax. This may require a new table introspection method.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/468#issuecomment-1229279539_", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/475/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1352953535, "node_id": "PR_kwDOCGYnMM4950Az", "number": 473, "title": "Support entrypoints for `--load-extension`", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-08-27T05:53:59Z", "updated_at": "2022-08-27T05:55:52Z", "closed_at": "2022-08-27T05:55:47Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/473", "body": "Refs #470\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--473.org.readthedocs.build/en/473/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/473/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1352932038, "node_id": "I_kwDOCGYnMM5QpBrG", "number": 470, "title": "Upgrade `--load-extension` to accept entrypoints like Datasette", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 6, "created_at": "2022-08-27T03:53:20Z", "updated_at": "2022-08-27T05:55:49Z", "closed_at": "2022-08-27T05:55:48Z", "author_association": "OWNER", "pull_request": null, "body": "Imitate:\r\n- https://github.com/simonw/datasette/pull/1789\r\n```\r\n# would load default entrypoint like before\r\ndatasette data.db --load-extension ext\r\n\r\n# loads the extensions with the \"sqlite3_foo_init\" entrpoint\r\ndatasette data.db --load-extension ext:sqlite3_foo_init\r\n\r\n# loads the extensions with the \"sqlite3_bar_init\" entrpoint\r\ndatasette data.db --load-extension ext:sqlite3_bar_init\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/470/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1352946135, "node_id": "I_kwDOCGYnMM5QpFHX", "number": 472, "title": "Reuse the locals/globals fix from --functions for other code accepting options", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 2, "created_at": "2022-08-27T05:12:05Z", "updated_at": "2022-08-27T05:20:12Z", "closed_at": "2022-08-27T05:20:12Z", "author_association": "OWNER", "pull_request": null, "body": "I figured out a workaround for the ugly `global x` hack here:\r\n- https://github.com/simonw/sqlite-utils/issues/471#issuecomment-1229120653", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/472/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1352931464, "node_id": "I_kwDOCGYnMM5QpBiI", "number": 469, "title": "sqlite-utils rows --order option", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 1, "created_at": "2022-08-27T03:49:51Z", "updated_at": "2022-08-27T04:30:49Z", "closed_at": "2022-08-27T04:10:32Z", "author_association": "OWNER", "pull_request": null, "body": "For consistency with `search`: https://sqlite-utils.datasette.io/en/stable/cli-reference.html#search\r\n\r\n```\r\n -o, --order TEXT Order by ('column' or 'column desc')\r\n```\r\n\r\nI wanted to run `sqlite-utils rows db.db mytable --order 'rowid desc'` to see the most recently imported rows.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/469/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1320243134, "node_id": "I_kwDOCGYnMM5OsU--", "number": 458, "title": "Support custom names for registered functions", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 1, "created_at": "2022-07-28T00:13:00Z", "updated_at": "2022-08-27T03:56:01Z", "closed_at": "2022-07-28T00:13:57Z", "author_association": "OWNER", "pull_request": null, "body": "In this example:\r\n\r\n```python\r\n @db.register_function\r\n def reverse_string(s):\r\n return \"\".join(reversed(list(s)))\r\n\r\n print(db.execute('select reverse_string(\"hello\")').fetchone()[0])\r\n```\r\nThere's currently no way to over-ride the automatically selected name for the SQL function.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/458/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1319881016, "node_id": "PR_kwDOCGYnMM48Mmde", "number": 457, "title": "Link to installation instructions", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 8355157, "label": "3.29"}, "comments": 2, "created_at": "2022-07-27T17:38:36Z", "updated_at": "2022-08-27T03:55:52Z", "closed_at": "2022-07-27T17:57:50Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/457", "body": "Also testing https://docs.readthedocs.io/en/stable/pull-requests.html", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/457/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1326087800, "node_id": "PR_kwDOCGYnMM48hI-_", "number": 460, "title": "Cross-link CLI to Python docs", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2022-08-02T16:18:28Z", "updated_at": "2022-08-18T21:58:10Z", "closed_at": "2022-08-18T21:58:07Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/460", "body": "Work in progress, partly to test the ReadTheDocs preview link action.\r\n\r\nRefs:\r\n- #426\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://readthedocs-preview--460.org.readthedocs.build/en/460/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/460/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1342357149, "node_id": "PR_kwDOCGYnMM49Wsnq", "number": 465, "title": "beanbag-docutils>=2.0", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-08-17T22:41:39Z", "updated_at": "2022-08-17T23:38:07Z", "closed_at": "2022-08-17T23:38:02Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/465", "body": "Refs #464", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/465/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1338001039, "node_id": "I_kwDOCGYnMM5PwEaP", "number": 464, "title": "Link from documentation to source code", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 5, "created_at": "2022-08-13T16:19:57Z", "updated_at": "2022-08-17T23:38:03Z", "closed_at": "2022-08-17T23:38:03Z", "author_association": "OWNER", "pull_request": null, "body": "Twitter conversation asking for ways to automate this here: https://twitter.com/simonw/status/1558260492015046656", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/464/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1342374388, "node_id": "PR_kwDOCGYnMM49Wv9T", "number": 466, "title": "Use Read the Docs action v1 (#463)", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2022-08-17T23:11:50Z", "updated_at": "2022-08-17T23:11:54Z", "closed_at": "2022-08-17T23:11:54Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/466", "body": "Read the Docs repository was renamed from `readthedocs/readthedocs-preview` to `readthedocs/actions/`. Now, the `preview` action is under `readthedocs/actions/preview` and is tagged as `v1`", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/466/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1326391841, "node_id": "PR_kwDOCGYnMM48iLGF", "number": 462, "title": "Discord badge", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-08-02T20:56:04Z", "updated_at": "2022-08-02T21:15:57Z", "closed_at": "2022-08-02T21:15:52Z", "author_association": "OWNER", "pull_request": "simonw/sqlite-utils/pulls/462", "body": "Also testing fix for:\r\n- https://github.com/readthedocs/readthedocs-preview/issues/10\r\n\r\n\r\n----\n:books: Documentation preview :books:: https://sqlite-utils--462.org.readthedocs.build/en/462/\n\r\n", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/462/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 1326349129, "node_id": "I_kwDOCGYnMM5PDntJ", "number": 461, "title": "Consider including animated SVG console demos", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-08-02T20:10:04Z", "updated_at": "2022-08-02T20:12:14Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "I recorded this one using https://github.com/nbedos/termtosvg - with `pipx install termtosvg` and then `termtosvg` - execute demo - `exit` to save.\r\n\r\n![sqlite-utils-insert-json](https://user-images.githubusercontent.com/9599/182464206-f4976af4-eda8-4020-8257-4ada1867fb44.svg)\r\n\r\n```json\r\n[\r\n {\r\n \"id\": 1,\r\n \"name\": \"Catimus\"\r\n },\r\n {\r\n \"id\": 2,\r\n \"name\": \"Feliopia\"\r\n }\r\n]\r\n```", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/461/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 1292060682, "node_id": "I_kwDOCGYnMM5NA0gK", "number": 450, "title": "Add --ignore option to more commands", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 9, "created_at": "2022-07-02T13:52:02Z", "updated_at": "2022-07-15T22:39:09Z", "closed_at": "2022-07-15T22:37:45Z", "author_association": "OWNER", "pull_request": null, "body": "As seen in https://sqlite-utils.datasette.io/en/stable/cli-reference.html#add-foreign-key\r\n\r\nCould make this TIL trick unnecessary: https://til.simonwillison.net/bash/ignore-errors", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/450/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1298531653, "node_id": "I_kwDOCGYnMM5NZgVF", "number": 451, "title": "Make sqlite_utils.utils.chunks a documented function", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2022-07-08T06:01:04Z", "updated_at": "2022-07-15T22:09:34Z", "closed_at": "2022-07-15T21:59:33Z", "author_association": "OWNER", "pull_request": null, "body": "I want to use it in another project: https://github.com/simonw/sqlite-utils/blob/8a9fe6498faf783a1fdeb1793e661ad194a05267/sqlite_utils/utils.py#L471-L474", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/451/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1306548397, "node_id": "I_kwDOCGYnMM5N4Fit", "number": 454, "title": "CLI command for duplicating tables", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2022-07-15T21:31:27Z", "updated_at": "2022-07-15T21:48:23Z", "closed_at": "2022-07-15T21:45:51Z", "author_association": "OWNER", "pull_request": null, "body": "CLI equivalent of:\r\n- #449", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/454/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1271426387, "node_id": "I_kwDOCGYnMM5LyG1T", "number": 444, "title": "CSV `extras_key=` and `ignore_extras=` equivalents for CLI tool", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 5, "created_at": "2022-06-14T22:22:47Z", "updated_at": "2022-07-07T16:39:18Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "> I forgot to add equivalents of `extras_key=` and `ignore_extras=` to the CLI tool - will do that in a separate issue.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/440#issuecomment-1155767915_", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/444/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null} {"id": 455486286, "node_id": "MDU6SXNzdWU0NTU0ODYyODY=", "number": 26, "title": "Mechanism for turning nested JSON into foreign keys / many-to-many", "user": {"value": 9599, "label": "simonw"}, "state": "open", "locked": 0, "assignee": null, "milestone": null, "comments": 14, "created_at": "2019-06-13T00:52:06Z", "updated_at": "2022-06-29T23:35:29Z", "closed_at": null, "author_association": "OWNER", "pull_request": null, "body": "The GitHub JSON APIs have a really interesting convention with respect to related objects.\r\n\r\nConsider https://api.github.com/repos/simonw/sqlite-utils/issues - here's a truncated subset:\r\n```json\r\n {\r\n \"id\": 449818897,\r\n \"node_id\": \"MDU6SXNzdWU0NDk4MTg4OTc=\",\r\n \"number\": 24,\r\n \"title\": \"Additional Column Constraints?\",\r\n \"user\": {\r\n \"login\": \"IgnoredAmbience\",\r\n \"id\": 98555,\r\n \"node_id\": \"MDQ6VXNlcjk4NTU1\",\r\n \"avatar_url\": \"https://avatars0.githubusercontent.com/u/98555?v=4\",\r\n \"gravatar_id\": \"\"\r\n },\r\n \"labels\": [\r\n {\r\n \"id\": 993377884,\r\n \"node_id\": \"MDU6TGFiZWw5OTMzNzc4ODQ=\",\r\n \"url\": \"https://api.github.com/repos/simonw/sqlite-utils/labels/enhancement\",\r\n \"name\": \"enhancement\",\r\n \"color\": \"a2eeef\",\r\n \"default\": true\r\n }\r\n ],\r\n \"state\": \"open\"\r\n }\r\n```\r\nThe `user` column lists a complete user. The `labels` column has a list of labels.\r\n\r\nSince both user and label have populated `id` field this is actually enough information for us to create records for them AND set up the corresponding foreign key (for user) and m2m relationships (for labels).\r\n\r\nIt would be really neat if `sqlite-utils` had some kind of mechanism for correctly processing these kind of patterns.\r\n\r\nThanks to `jq` there's not much need for extra customization of the shape here - if we support a narrowly defined structure users can use `jq` to reshape arbitrary JSON to match.", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/26/reactions\", \"total_count\": 4, \"+1\": 4, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": null}