home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where issue = 520655983 and user = 9599 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 1

  • simonw · 12 ✖

issue 1

  • "Invalid SQL" page should let you edit the SQL · 12 ✖

author_association 1

  • OWNER 12
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
852706970 https://github.com/simonw/datasette/issues/619#issuecomment-852706970 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDg1MjcwNjk3MA== simonw 9599 2021-06-02T04:15:54Z 2021-06-02T04:15:54Z OWNER

{
    "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  
852703357 https://github.com/simonw/datasette/issues/619#issuecomment-852703357 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDg1MjcwMzM1Nw== simonw 9599 2021-06-02T04:08:03Z 2021-06-02T04:08:03Z OWNER

A SQL error now looks like this: https://latest.datasette.io/fixtures?sql=select%0D%0A++*%0D%0Afrom%0D%0A++%5Bfoo%5D

I'm going to get rid of that "0 results" message if an error is shown.

{
    "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  
850059607 https://github.com/simonw/datasette/issues/619#issuecomment-850059607 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDg1MDA1OTYwNw== simonw 9599 2021-05-28T02:08:58Z 2021-05-28T02:08:58Z OWNER

Remaining work will happen in #1346

{
    "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  
850057694 https://github.com/simonw/datasette/issues/619#issuecomment-850057694 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDg1MDA1NzY5NA== simonw 9599 2021-05-28T02:03:05Z 2021-05-28T02:03:05Z OWNER

I nearly got this working, but I ran into one last problem: the code path for when an error is raised but the user specified ?_shape=array. I'll open a draft PR with where I've got to so far.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Invalid SQL" page should let you edit the SQL 520655983  
850025106 https://github.com/simonw/datasette/issues/619#issuecomment-850025106 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDg1MDAyNTEwNg== simonw 9599 2021-05-28T00:18:30Z 2021-05-28T00:18:30Z OWNER

I'm going to return a 400 HTTP status code for "bad request", under the assumption that the client sent bad SQL.

{
    "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  
850019486 https://github.com/simonw/datasette/issues/619#issuecomment-850019486 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDg1MDAxOTQ4Ng== simonw 9599 2021-05-28T00:05:50Z 2021-05-28T00:05:50Z OWNER

Came up on discussions here: https://github.com/simonw/datasette/discussions/1334

{
    "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  
782246111 https://github.com/simonw/datasette/issues/619#issuecomment-782246111 https://api.github.com/repos/simonw/datasette/issues/619 MDEyOklzc3VlQ29tbWVudDc4MjI0NjExMQ== simonw 9599 2021-02-19T18:11:22Z 2021-02-19T18:11:22Z OWNER

Big usability improvement, see also #1236

{
    "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  
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  

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