home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 1865232341 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • simonw 5

issue 1

  • Datasette --get --actor option · 5 ✖

author_association 1

  • OWNER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1696355634 https://github.com/simonw/datasette/issues/2153#issuecomment-1696355634 https://api.github.com/repos/simonw/datasette/issues/2153 IC_kwDOBm6k_c5lHFUy simonw 9599 2023-08-28T20:19:15Z 2023-08-28T20:19:15Z OWNER

Documentation: - https://docs.datasette.io/en/latest/cli-reference.html#datasette-get

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette --get --actor option 1865232341  
1691779180 https://github.com/simonw/datasette/issues/2153#issuecomment-1691779180 https://api.github.com/repos/simonw/datasette/issues/2153 IC_kwDOBm6k_c5k1oBs simonw 9599 2023-08-24T14:21:03Z 2023-08-24T14:21:03Z OWNER

datasette serve currently only has a --get - for this to be really useful it needs to grow --post and maybe other verbs too.

Which is a good argument for moving this functionality to datasette client get ... instead.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette --get --actor option 1865232341  
1691763427 https://github.com/simonw/datasette/issues/2153#issuecomment-1691763427 https://api.github.com/repos/simonw/datasette/issues/2153 IC_kwDOBm6k_c5k1kLj simonw 9599 2023-08-24T14:12:43Z 2023-08-24T14:12:43Z OWNER

Annoying that datasette client ... makes a great name both for a plugin that executes simulated queries against a local database (thanks to its similarity to the existing datasette.client Python API) but is also the ideal name for a command for running commands as a client of an external Datasette instance!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette --get --actor option 1865232341  
1691761685 https://github.com/simonw/datasette/issues/2153#issuecomment-1691761685 https://api.github.com/repos/simonw/datasette/issues/2153 IC_kwDOBm6k_c5k1jwV simonw 9599 2023-08-24T14:11:41Z 2023-08-24T14:11:41Z OWNER

Another option: implement this as a plugin, providing a new command like datasette get ...

Or implement datasette client get ... as core commands or a plugin - except that clashes with the datasette client command that https://github.com/simonw/dclient adds (which is a tool for hitting remote Datasette instances, not running simulated queries through a local one).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette --get --actor option 1865232341  
1691753489 https://github.com/simonw/datasette/issues/2153#issuecomment-1691753489 https://api.github.com/repos/simonw/datasette/issues/2153 IC_kwDOBm6k_c5k1hwR simonw 9599 2023-08-24T14:07:25Z 2023-08-24T14:09:16Z OWNER

Building that "_r" array is the main reason this would be useful, but it's also fiddly to get right.

datasette create-token has a design for that already: https://docs.datasette.io/en/1.0a4/authentication.html#datasette-create-token datasette create-token root \ --secret mysecret \ --all view-instance \ --all view-table \ --database docs view-query \ --resource docs documents insert-row \ --resource docs documents update-row Adding imitations of those options (excluding --secret, not needed here) to datasette serve would add a LOT of extra options, but it would also make it really convenient to attempt a request with a specific set of restrictions. Not sure if that would be worth the extra --help output or not.

I feel like the names would have to have a common prefix though. Maybe something like this:

bash datasette serve data.db --get `/data/mytable.json' \ --actor-id root \ --r-all view-instance \ --r-database data view-query \ --r-resource data documents update-row Other options could be the longer --restrict-all/--restrict-database/--restrict-resource.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette --get --actor option 1865232341  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 19.638ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows