home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 906385991 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 9

issue 1

  • CSV ?_stream=on redundantly calculates facets for every page · 9 ✖

author_association 1

  • OWNER 9
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
852237347 https://github.com/simonw/datasette/issues/1349#issuecomment-852237347 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MjIzNzM0Nw== simonw 9599 2021-06-01T15:52:50Z 2021-06-01T15:52:50Z OWNER

Fixed in https://github.com/simonw/datasette/commit/d1d06ace49606da790a765689b4fbffa4c6deecb

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
851133125 https://github.com/simonw/datasette/issues/1349#issuecomment-851133125 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MTEzMzEyNQ== simonw 9599 2021-05-31T03:01:48Z 2021-05-31T03:01:48Z OWNER

I think it's worth getting ?_trace=1 to work with streaming CSV - this would have helped me spot this issue a long time ago.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
851131999 https://github.com/simonw/datasette/issues/1349#issuecomment-851131999 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MTEzMTk5OQ== simonw 9599 2021-05-31T02:57:25Z 2021-05-31T02:57:25Z OWNER

I'm having a really hard time figuring out how to unit test this - ideally I'd monitor which SQL queries are executed using the tracing mechanism, but that's not set up to work with anything other than HTML or JSON outputs: https://github.com/simonw/datasette/blob/c5ae1197a208e1b034c88882e3ac865813a40980/datasette/tracer.py#L125-L134

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
851129464 https://github.com/simonw/datasette/issues/1349#issuecomment-851129464 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MTEyOTQ2NA== simonw 9599 2021-05-31T02:48:06Z 2021-05-31T02:48:06Z OWNER

Actually there is precedent for swapping out request.scope for a new scope, as seen here in the routing code: https://github.com/simonw/datasette/blob/c5ae1197a208e1b034c88882e3ac865813a40980/datasette/app.py#L1117-L1122

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
851129019 https://github.com/simonw/datasette/issues/1349#issuecomment-851129019 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MTEyOTAxOQ== simonw 9599 2021-05-31T02:46:38Z 2021-05-31T02:46:38Z OWNER

I think the right way to do this is to construct a new Request with a modified ASGI scope: https://github.com/simonw/datasette/blob/c5ae1197a208e1b034c88882e3ac865813a40980/datasette/utils/asgi.py#L88-L99

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
851128524 https://github.com/simonw/datasette/issues/1349#issuecomment-851128524 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MTEyODUyNA== simonw 9599 2021-05-31T02:44:44Z 2021-05-31T02:44:44Z OWNER

Now that I have ?_nofacets=1 I can use that to fix this. The challenge is that in this block of code I need to modify the incoming request's query string arguments, which isn't something I've done before: https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/views/base.py#L263-L270

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
850778311 https://github.com/simonw/datasette/issues/1349#issuecomment-850778311 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MDc3ODMxMQ== simonw 9599 2021-05-29T06:12:21Z 2021-05-29T06:12:21Z OWNER

It's not just facets, I think it's trying to execute suggested facets too!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
850778273 https://github.com/simonw/datasette/issues/1349#issuecomment-850778273 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MDc3ODI3Mw== simonw 9599 2021-05-29T06:11:59Z 2021-05-29T06:11:59Z OWNER

Related issue: https://github.com/simonw/datasette/issues/263 - "Facets should not execute for ?shape=array|object"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  
850778230 https://github.com/simonw/datasette/issues/1349#issuecomment-850778230 https://api.github.com/repos/simonw/datasette/issues/1349 MDEyOklzc3VlQ29tbWVudDg1MDc3ODIzMA== simonw 9599 2021-05-29T06:11:28Z 2021-05-29T06:11:28Z OWNER

Relevant code: https://github.com/simonw/datasette/blob/0a7621f96f8ad14da17e7172e8a7bce24ef78966/datasette/views/base.py#L263-L315

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
CSV ?_stream=on redundantly calculates facets for every page 906385991  

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