{"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-1017016553", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 1017016553, "node_id": "IC_kwDOBm6k_c48nnDp", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-01-20T01:06:37Z", "updated_at": "2022-01-20T01:06:37Z", "author_association": "OWNER", "body": "> A problem with this is that if you're using `--query` you likely want ALL of the results - at the moment the only Datasette output type that can stream everything is `.csv` and plugin formats can't handle full streams, see #1062 and #1177.\r\n\r\nI figured out a neat pattern for streaming JSON arrays in this TIL: https://til.simonwillison.net/python/output-json-array-streaming", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-855282466", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 855282466, "node_id": "MDEyOklzc3VlQ29tbWVudDg1NTI4MjQ2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-05T19:05:06Z", "updated_at": "2021-06-05T19:05:06Z", "author_association": "OWNER", "body": "Yeah that's a good point. I avoided making them sub-commands because `datasette serve` already supports the multitude of other arguments they also need... but actually that was just me being lazy - I can easily share arguments between multiple functions like I do in `sqlite-utils` itself: https://github.com/simonw/sqlite-utils/blob/d1a372b3006e6cf7d2017b3ddc484bf5c033e45d/sqlite_utils/cli.py#L46", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853566337", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853566337, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU2NjMzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T05:08:32Z", "updated_at": "2021-06-03T05:08:32Z", "author_association": "OWNER", "body": "Also relevant: CSV streaming for canned queries in #526 - even better if we could stream ANY SQL query.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853565850", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853565850, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU2NTg1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T05:07:21Z", "updated_at": "2021-06-03T05:07:21Z", "author_association": "OWNER", "body": "A problem with this is that if you're using `--query` you likely want ALL of the results - at the moment the only Datasette output type that can stream everything is `.csv` and plugin formats can't handle full streams, see #1062 and #1177.\r\n\r\nSo there's not much point implementing this unless we first make plugins able to add custom streaming formats.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853562891", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853562891, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU2Mjg5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T04:59:40Z", "updated_at": "2021-06-03T04:59:40Z", "author_association": "OWNER", "body": "It's weird that `--get` is documented on this page right now: https://docs.datasette.io/en/stable/getting_started.html#datasette-get\r\n\r\nIf I implement this I should build a new \"Datasette on the command-line\" documentation page to cover both `--get` and `--query`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853560870", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853560870, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU2MDg3MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T04:53:47Z", "updated_at": "2021-06-03T04:53:56Z", "author_association": "OWNER", "body": "This is also interesting when used in conjunction with the proposed `datasette insert` command from #1163 - Datasette would become a plugin-driven CLI tool for both ingesting and outputting data, as a side-effect of its web features.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853560389", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853560389, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU2MDM4OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T04:52:13Z", "updated_at": "2021-06-03T04:52:13Z", "author_association": "OWNER", "body": "I should implement #1355 for more efficient `--csv` streaming as part of this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853560237", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853560237, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU2MDIzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T04:51:49Z", "updated_at": "2021-06-03T04:51:49Z", "author_association": "OWNER", "body": "This feels like a relatively simple feature to implement that unlocks a whole new set of possible uses for Datasette - as described by @eyeseast in https://github.com/simonw/sqlite-utils/issues/264#issue-907642546.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1356#issuecomment-853559915", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1356", "id": 853559915, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MzU1OTkxNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-03T04:50:52Z", "updated_at": "2021-06-03T04:50:52Z", "author_association": "OWNER", "body": "What happens if you pass multiple databases? The `--query` would be executed against the first one. And if you pass `--crossdb` it would be executed against the `/_memory` database and would support cross-database joins.\r\n\r\nKey thing here is that output plugins are supported (also plugins that add new SQL functions), making many Datasette plugins usable from the command-line.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 910092577, "label": "Research: syntactic sugar for using --get with SQL queries, maybe \"datasette query\""}, "performed_via_github_app": null}