github
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/sqlite-utils/pull/377#issuecomment-1009531863 | https://api.github.com/repos/simonw/sqlite-utils/issues/377 | 1009531863 | IC_kwDOCGYnMM48LDvX | 22429695 | 2022-01-11T02:03:00Z | 2022-01-11T02:03:00Z | NONE | # [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/377?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report > Merging [#377](https://codecov.io/gh/simonw/sqlite-utils/pull/377?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (f4ea0d3) into [main](https://codecov.io/gh/simonw/sqlite-utils/commit/b6dad08a8389736b7e960cfe9bc719cfc21a98f5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (b6dad08) will **decrease** coverage by `0.01%`. > The diff coverage is `96.00%`. [![Impacted file tree graph](https://codecov.io/gh/simonw/sqlite-utils/pull/377/graphs/tree.svg?width=650&height=150&src=pr&token=O0X3703L9P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/sqlite-utils/pull/377?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) ```diff @@ Coverage Diff @@ ## main #377 +/- ## ========================================== - Coverage 96.52% 96.50% -0.02% ========================================== Files 6 6 Lines 2330 2378 +48 ========================================== + Hits 2249 2295 +46 - Misses 81 83 +2 ``` | [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/377?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [sqlite\_utils/cli.py](https://codecov.io/gh/simonw/sqlite-utils/pull/377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2NsaS5weQ==) | `95.49% <94.28%> (-0.0… | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1097477582 | |
https://github.com/simonw/sqlite-utils/issues/380#issuecomment-1009544785 | https://api.github.com/repos/simonw/sqlite-utils/issues/380 | 1009544785 | IC_kwDOCGYnMM48LG5R | 9599 | 2022-01-11T02:32:56Z | 2022-01-11T02:32:56Z | OWNER | CLI and Python library improvements to help run [ANALYZE](https://www.sqlite.org/lang_analyze.html) after creating indexes or inserting rows, to gain better performance from the SQLite query planner when it runs against indexes. Three new CLI commands: `create-database`, `analyze` and `bulk`. - New `sqlite-utils create-database` command for creating new empty database files. ([#348](https://github.com/simonw/sqlite-utils/issues/348)) - New Python methods for running `ANALYZE` against a database, table or index: `db.analyze()` and `table.analyze()`, see [Optimizing index usage with ANALYZE](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-analyze). ([#366](https://github.com/simonw/sqlite-utils/issues/366)) - New [sqlite-utils analyze command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-analyze) for running `ANALYZE` using the CLI. ([#379](https://github.com/simonw/sqlite-utils/issues/379)) - The `create-index`, `insert` and `update` commands now have a new `--analyze` option for running `ANALYZE` after the command has completed. ([#379](https://github.com/simonw/sqlite-utils/issues/379)) - New [sqlite-utils bulk command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-bulk) which can import records in the same way as `sqlite-utils insert` (from JSON, CSV or TSV) and use them to bulk execute a parametrized SQL query. ([#375](https://github.com/simonw/sqlite-utils/issues/375)) - The CLI tool can now also be run using `python -m sqlite_utils`. ([#368](https://github.com/simonw/sqlite-utils/issues/368)) - Using `--fmt` now implies `--table`, so you don't need to pass both options. ([#374](https://github.com/simonw/sqlite-utils/issues/374)) - The `--convert` function applied to rows can now modify the row in place. ([#371](https://github.com/simonw/sqlite-utils/issues/371)) - The [insert-files command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-files) supports two new columns: `stem` and `suffix`. ([#372](https://github.co… | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1098574572 | |
https://github.com/simonw/sqlite-utils/pull/377#issuecomment-1009532125 | https://api.github.com/repos/simonw/sqlite-utils/issues/377 | 1009532125 | IC_kwDOCGYnMM48LDzd | 9599 | 2022-01-11T02:03:35Z | 2022-01-11T02:03:35Z | OWNER | Documentation: https://github.com/simonw/sqlite-utils/blob/f4ea0d32c0543373eefaa9b9f3911eb07549eecb/docs/cli.rst#executing-sql-in-bulk | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1097477582 | |
https://github.com/simonw/sqlite-utils/issues/375#issuecomment-1009536276 | https://api.github.com/repos/simonw/sqlite-utils/issues/375 | 1009536276 | IC_kwDOCGYnMM48LE0U | 9599 | 2022-01-11T02:12:58Z | 2022-01-11T02:12:58Z | OWNER | Documentation: https://sqlite-utils.datasette.io/en/latest/cli.html#executing-sql-in-bulk | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1097251014 | |
https://github.com/simonw/sqlite-utils/issues/382#issuecomment-1010461844 | https://api.github.com/repos/simonw/sqlite-utils/issues/382 | 1010461844 | IC_kwDOCGYnMM48OmyU | 9599 | 2022-01-11T23:33:14Z | 2022-01-11T23:33:14Z | OWNER | Documentation: https://sqlite-utils.datasette.io/en/latest/cli.html#returning-all-rows-in-a-table | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099585611 | |
https://github.com/simonw/sqlite-utils/issues/381#issuecomment-1010462035 | https://api.github.com/repos/simonw/sqlite-utils/issues/381 | 1010462035 | IC_kwDOCGYnMM48Om1T | 9599 | 2022-01-11T23:33:37Z | 2022-01-11T23:33:37Z | OWNER | Documentation: https://sqlite-utils.datasette.io/en/latest/cli.html#returning-all-rows-in-a-table | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099584685 | |
https://github.com/simonw/sqlite-utils/issues/383#issuecomment-1010386802 | https://api.github.com/repos/simonw/sqlite-utils/issues/383 | 1010386802 | IC_kwDOCGYnMM48OUdy | 9599 | 2022-01-11T21:44:53Z | 2022-01-11T21:44:53Z | OWNER | Here's the `cog` code I used: https://github.com/simonw/sqlite-utils/blob/1d44b0cc2784c94aed1bcf350225cd86ee1aa7e5/docs/cli-reference.rst#L11-L76 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099586786 | |
https://github.com/simonw/sqlite-utils/issues/365#issuecomment-1009521921 | https://api.github.com/repos/simonw/sqlite-utils/issues/365 | 1009521921 | IC_kwDOCGYnMM48LBUB | 9599 | 2022-01-11T01:37:53Z | 2022-01-11T01:37:53Z | OWNER | I decided to go with making this opt-in, mainly for consistency with the other places where I added this feature - see: - #379 - #366 You can now run the following: sqlite-utils create-index mydb.db mytable mycolumn --analyze And ``ANALYZE`` will be run on the index once it has been created. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1096558279 | |
https://github.com/simonw/sqlite-utils/pull/377#issuecomment-1009534817 | https://api.github.com/repos/simonw/sqlite-utils/issues/377 | 1009534817 | IC_kwDOCGYnMM48LEdh | 9599 | 2022-01-11T02:09:38Z | 2022-01-11T02:09:38Z | OWNER | I tested this like so: ``` % wget 'https://raw.githubusercontent.com/wri/global-power-plant-database/master/output_database/global_power_plant_database.csv' % sqlite-utils create-database test.db % sqlite-utils create-table test.db power_plants url text owner text % sqlite-utils schema test.db CREATE TABLE [power_plants] ( [url] TEXT, [owner] TEXT ); % sqlite-utils bulk test.db 'insert into power_plants (url, owner) values (:url, :owner)' global_power_plant_database.csv --csv [------------------------------------] 0% [###################################-] 99% % sqlite-utils tables --counts test.db -t table count ------------ ------- power_plants 33643 ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1097477582 | |
https://github.com/simonw/sqlite-utils/issues/383#issuecomment-1010333511 | https://api.github.com/repos/simonw/sqlite-utils/issues/383 | 1010333511 | IC_kwDOCGYnMM48OHdH | 9599 | 2022-01-11T20:27:08Z | 2022-01-11T20:27:08Z | OWNER | I'll call the new page "CLI reference", for consistency with the API reference page here: https://sqlite-utils.datasette.io/en/stable/reference.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099586786 | |
https://github.com/simonw/sqlite-utils/issues/366#issuecomment-1009508865 | https://api.github.com/repos/simonw/sqlite-utils/issues/366 | 1009508865 | IC_kwDOCGYnMM48K-IB | 9599 | 2022-01-11T01:08:51Z | 2022-01-11T01:08:51Z | OWNER | The Python methods are all done now, next step is the CLI options. I'll do those in a separate issue. | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1096563265 | |
https://github.com/simonw/sqlite-utils/issues/383#issuecomment-1010387223 | https://api.github.com/repos/simonw/sqlite-utils/issues/383 | 1010387223 | IC_kwDOCGYnMM48OUkX | 9599 | 2022-01-11T21:45:32Z | 2022-01-11T21:45:32Z | OWNER | The new page of documentation: https://sqlite-utils.datasette.io/en/latest/cli-reference.html | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099586786 | |
https://github.com/simonw/sqlite-utils/issues/383#issuecomment-1010440166 | https://api.github.com/repos/simonw/sqlite-utils/issues/383 | 1010440166 | IC_kwDOCGYnMM48Ohfm | 9599 | 2022-01-11T22:55:05Z | 2022-01-11T22:55:05Z | OWNER | Twitter thread about this: https://twitter.com/simonw/status/1481020195074293761 | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099586786 | |
https://github.com/simonw/sqlite-utils/issues/381#issuecomment-1010441118 | https://api.github.com/repos/simonw/sqlite-utils/issues/381 | 1010441118 | IC_kwDOCGYnMM48Ohue | 9599 | 2022-01-11T22:56:53Z | 2022-01-11T22:57:09Z | OWNER | `sqlite-utils search` has `--limit` already: https://sqlite-utils.datasette.io/en/latest/cli-reference.html#search ``` --limit INTEGER Number of rows to return - defaults to everything ``` | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1099584685 | |
https://github.com/simonw/sqlite-utils/issues/365#issuecomment-1009548580 | https://api.github.com/repos/simonw/sqlite-utils/issues/365 | 1009548580 | IC_kwDOCGYnMM48LH0k | 536941 | 2022-01-11T02:43:34Z | 2022-01-11T02:43:34Z | CONTRIBUTOR | thanks so much! always a pleasure to see how you work through these things | { "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1096558279 |