home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 721050815 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • simonw 6
  • jsfenfen 1

author_association 2

  • OWNER 6
  • CONTRIBUTOR 1

issue 1

  • "Edit SQL" button on canned queries · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
708520800 https://github.com/simonw/datasette/issues/1019#issuecomment-708520800 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODUyMDgwMA== jsfenfen 639012 2020-10-14T16:37:19Z 2020-10-14T16:37:19Z CONTRIBUTOR

🎉 Thanks so much @simonw ! 🎉

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  
708139822 https://github.com/simonw/datasette/issues/1019#issuecomment-708139822 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODEzOTgyMg== simonw 9599 2020-10-14T03:53:21Z 2020-10-14T03:53:21Z OWNER

Demos: - https://latest.datasette.io/fixtures/neighborhood_search has the link - https://latest.datasette.io/fixtures/neighborhood_search?text=ber has the link, and the link passes through the parameter that has already been entered - https://latest.datasette.io/fixtures/%F0%9D%90%9C%F0%9D%90%A2%F0%9D%90%AD%F0%9D%90%A2%F0%9D%90%9E%F0%9D%90%AC has the link - https://latest.datasette.io/fixtures/pragma_cache_size does not have the link (PRAGMA is not allowed in regular editable queries) - https://latest.datasette.io/fixtures/magic_parameters does not have the link (magic parameters)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  
708130290 https://github.com/simonw/datasette/issues/1019#issuecomment-708130290 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODEzMDI5MA== simonw 9599 2020-10-14T03:17:57Z 2020-10-14T03:17:57Z OWNER

One last edge-case (I think) - magic parameters aren't supported for non-canned-queries, so if a query includes those it shouldn't show an Edit SQL link: https://latest.datasette.io/fixtures/magic_parameters

I don't have a clean way of detecting if a query contains defined magic parameters, but I can instead do a dumb substring match for :_ and skip showing the Edit SQL link if that is present.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  
708128286 https://github.com/simonw/datasette/issues/1019#issuecomment-708128286 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODEyODI4Ng== simonw 9599 2020-10-14T03:11:33Z 2020-10-14T03:14:07Z OWNER

Another edge-case: https://latest.datasette.io/fixtures/pragma_cache_size (PRAGMA cache_size;) isn't an allowed query usually, so linking to "Edit SQL" for it would link to an error page: https://latest.datasette.io/fixtures?sql=PRAGMA+cache_size%3B

Can use datasette.utils.validate_sql_select(sql) to check for that - it raises datasette.utils.InvalidSql if there's a problem.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  
708127294 https://github.com/simonw/datasette/issues/1019#issuecomment-708127294 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODEyNzI5NA== simonw 9599 2020-10-14T03:08:13Z 2020-10-14T03:08:13Z OWNER

Maybe like this:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  
708114636 https://github.com/simonw/datasette/issues/1019#issuecomment-708114636 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODExNDYzNg== simonw 9599 2020-10-14T02:24:56Z 2020-10-14T02:24:56Z OWNER

So it would appear on this page: https://latest.datasette.io/fixtures/neighborhood_search#fragment-goes-here

Probably as a blue "Edit SQL" link next to those buttons.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  
708113989 https://github.com/simonw/datasette/issues/1019#issuecomment-708113989 https://api.github.com/repos/simonw/datasette/issues/1019 MDEyOklzc3VlQ29tbWVudDcwODExMzk4OQ== simonw 9599 2020-10-14T02:22:40Z 2020-10-14T02:22:40Z OWNER

I've found myself wanting this too.

It should respect the allow-sql permission so it doesn't display if the user isn't able to run custom SQL.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Edit SQL" button on canned queries 721050815  

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 20.026ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows