home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 520655983 and "updated_at" is on date 2020-09-23 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • simonw 5
  • obra 1

author_association 2

  • OWNER 5
  • NONE 1

issue 1

  • "Invalid SQL" page should let you edit the SQL · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
698024773 https://github.com/simonw/datasette/issues/619#issuecomment-698024773 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDY5ODAyNDc3Mw== simonw 9599 2020-09-23T23:31:46Z 2020-09-23T23:31:46Z OWNER

I'm going to have to untangle Datasette's error handling a bit for this - currently the expectation is that exceptions will be handled at a higher level, but I need to rethink that to make it cleaner for views like the "execute custom SQL" view to add their own error handling (and still be able to return the correct HTTP status codes, even with custom pages).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  
697998045 https://github.com/simonw/datasette/issues/619#issuecomment-697998045 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDY5Nzk5ODA0NQ== simonw 9599 2020-09-23T22:09:06Z 2020-09-23T22:09:06Z OWNER

I'll add this to the succesful JSON format: json { "ok": true, "error": null }

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  
697995885 https://github.com/simonw/datasette/issues/619#issuecomment-697995885 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDY5Nzk5NTg4NQ== simonw 9599 2020-09-23T22:02:44Z 2020-09-23T22:08:28Z OWNER

So the JSON (still served with a 500 code) will look something like this: json { "ok": false, "status": 500, "database": "fixtures", "query_name": null, "rows": [], "truncated": false, "error": "Error message goes here", "columns": [], "query": { "sql": "the query that broke goes here", "params": {} }, "private": false, "allow_execute_sql": true, "query_ms": 0.8716583251953125, "source": "tests/fixtures.py", "source_url": "https://github.com/simonw/datasette/blob/master/tests/fixtures.py", "license": "Apache License 2.0", "license_url": "https://github.com/simonw/datasette/blob/master/LICENSE" }

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  
697995303 https://github.com/simonw/datasette/issues/619#issuecomment-697995303 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDY5Nzk5NTMwMw== simonw 9599 2020-09-23T22:01:08Z 2020-09-23T22:01:08Z OWNER

This is a little tricky to solve, because of the location of the form and the need to return JSON as well as HTML. It would be weird if a JSON request came in and got back the standard output from https://latest.datasette.io/fixtures.json when they were expecting to get back JSON in the shape of https://latest.datasette.io/fixtures.json?sql=select%20*%20from%20sqlite_master

I'm going to return the HTML view that you would get for 0 results for a query - https://latest.datasette.io/fixtures?sql=select%201%20limit%200 - but with an error message.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  
697980061 https://github.com/simonw/datasette/issues/619#issuecomment-697980061 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDY5Nzk4MDA2MQ== simonw 9599 2020-09-23T21:22:42Z 2020-09-23T21:22:42Z OWNER

Yeah that sucks. Bumping this up the priority list.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  
697973420 https://github.com/simonw/datasette/issues/619#issuecomment-697973420 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDY5Nzk3MzQyMA== obra 45416 2020-09-23T21:07:58Z 2020-09-23T21:07:58Z NONE

I've just run into this after crafting a complex query and discovered that hitting back loses my query.

Even showing me the whole bad query would be a huge improvement over the current status quo.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  

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 29.346ms · About: github-to-sqlite