home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 1170144879 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 8

issue 1

  • Refactor and simplify Datasette routing and views · 8 ✖

author_association 1

  • OWNER 8
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1074321862 https://github.com/simonw/datasette/issues/1660#issuecomment-1074321862 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c5ACNnG simonw 9599 2022-03-21T19:19:01Z 2022-03-21T19:19:01Z OWNER

I've simplified this a ton now. I'm going to keep working on this in the long-term but I think this issue can be closed.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1074287177 https://github.com/simonw/datasette/issues/1660#issuecomment-1074287177 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c5ACFJJ simonw 9599 2022-03-21T18:51:42Z 2022-03-21T18:51:42Z OWNER

BaseView is looking a LOT slimmer now that I've moved all of the permissions stuff out of it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1074136176 https://github.com/simonw/datasette/issues/1660#issuecomment-1074136176 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c5ABgRw simonw 9599 2022-03-21T16:38:46Z 2022-03-21T16:38:46Z OWNER

I'm going to refactor this stuff out and document it so it can be easily used by plugins:

https://github.com/simonw/datasette/blob/4a4164b81191dec35e423486a208b05a9edc65e4/datasette/views/base.py#L69-L103

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1073355032 https://github.com/simonw/datasette/issues/1660#issuecomment-1073355032 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_-hkY simonw 9599 2022-03-20T21:46:43Z 2022-03-20T21:46:43Z OWNER

I think the way to get rid of most of the remaining complexity in DataView is to refactor how CSV stuff works - pulling it in line with other export factors and extracting the streaming mechanism. Opening a fresh issue for that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1073073599 https://github.com/simonw/datasette/issues/1660#issuecomment-1073073599 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_9c2_ simonw 9599 2022-03-19T20:06:40Z 2022-03-19T20:06:40Z OWNER

This blocks: - #1668

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1068418619 https://github.com/simonw/datasette/issues/1660#issuecomment-1068418619 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_rsY7 simonw 9599 2022-03-15T20:06:19Z 2022-03-15T20:06:19Z OWNER

Also related: - #878 - #1512 - #1518 - #870

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1068417357 https://github.com/simonw/datasette/issues/1660#issuecomment-1068417357 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_rsFN simonw 9599 2022-03-15T20:05:08Z 2022-03-15T20:05:08Z OWNER

DataView is used as the base class for:

  • DatabaseView
  • DatabaseDownload (just so the permissions checks can be called)
  • QueryView - which isn't routed to directly, it's called from DatabaseView if ?sql= is available and TableView for canned queries
  • RowTableShared which is the base class for TableView and RowView
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1068415072 https://github.com/simonw/datasette/issues/1660#issuecomment-1068415072 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_rrhg simonw 9599 2022-03-15T20:02:36Z 2022-03-15T20:02:36Z OWNER

This is one of the worst bits - the get_format() method on the DataView base class actually modifies args, including removing keys! Really confusing: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L454-L482

Then BaseView has some surprising responsibilities. It has a utility helper for checking multiple permissions at once:

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L81-L105

And its own render method that adds extra stuff to the template context and handles the rel: alternate header:

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L131-L157

Then DataView does all sorts of weird stuff - from handling database hashes (which I want to remove, see #647):

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L206-L219

To streaming CSV responses: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L286-L308

To handling SQLite exceptions: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L514-L526

And a ton more. It' s a big mess.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  

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