home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where "created_at" is on date 2018-04-11 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • 500 from missing table name 1
  • Cleaner mechanism for handling custom errors 1
  • Hide Spatialite system tables 1

user 1

  • simonw · 3 ✖

author_association 1

  • OWNER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
380619851 https://github.com/simonw/datasette/issues/193#issuecomment-380619851 https://api.github.com/repos/simonw/datasette/issues/193 MDEyOklzc3VlQ29tbWVudDM4MDYxOTg1MQ== simonw 9599 2018-04-11T22:48:19Z 2018-04-11T22:48:19Z OWNER

I can clean this up further with the mechanism I'm using for #184

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Cleaner mechanism for handling custom errors 310882100  
380608340 https://github.com/simonw/datasette/issues/184#issuecomment-380608340 https://api.github.com/repos/simonw/datasette/issues/184 MDEyOklzc3VlQ29tbWVudDM4MDYwODM0MA== simonw 9599 2018-04-11T21:55:41Z 2018-04-11T21:55:41Z OWNER

Yuck, nasty - OK I get it, this happens with ANY non-existent table name. Let's fix that - these should clearly return an HTTP 404.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
500 from missing table name 292011379  
380606998 https://github.com/simonw/datasette/pull/200#issuecomment-380606998 https://api.github.com/repos/simonw/datasette/issues/200 MDEyOklzc3VlQ29tbWVudDM4MDYwNjk5OA== simonw 9599 2018-04-11T21:50:14Z 2018-04-11T21:50:14Z OWNER

We should only do this if we're certain the spatialite module has been loaded. I could imagine someone having a sql_statements_log table of their own without using spatialite for example.

I think the most reliable way to detect spatialite is to run SELECT AddGeometryColumn(1, 2, 3, 4, 5); against a :memory: database and see if it throws an exception - similar to how we detect FTS. We could add this as a detect_spatialite() function in utils.py and call it once on startup.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Hide Spatialite system tables 313494458  

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