home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 853895159

This data as json

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/datasette/issues/1356#issuecomment-853895159 https://api.github.com/repos/simonw/datasette/issues/1356 853895159 MDEyOklzc3VlQ29tbWVudDg1Mzg5NTE1OQ== 25778 2021-06-03T14:03:59Z 2021-06-03T14:03:59Z CONTRIBUTOR

(Putting thoughts here to keep the conversation in one place.)

I think using datasette for this use-case is the right approach. I usually have both datasette and sqlite-utils installed in the same project, and that's where I'm trying out queries, so it probably makes the most sense to have datasette also manage the output (and maybe the input, too).

It seems like both --get and --query could work better as subcommands, rather than options, if you're looking at building out a full CLI experience in datasette. It would give a cleaner separation in what you're trying to do and let each have its own dedicated options. So something like this:

```sh

run an arbitrary query

datasette query covid.db "select * from ny_times_us_counties limit 1" --format yaml

run a canned query

datasette get covid.db some-canned-query --format yaml ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
910092577  
Powered by Datasette · Queries took 0.761ms · About: github-to-sqlite