home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 273703829 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

user 1

  • simonw · 10 ✖

issue 1

  • Filter UI on table page · 10 ✖

author_association 1

  • OWNER 10
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
346694211 https://github.com/simonw/datasette/issues/86#issuecomment-346694211 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NjY5NDIxMQ== simonw 9599 2017-11-23T20:34:32Z 2017-11-23T20:34:32Z OWNER

And with ef3eacf622e69723d48ab1ad597645770a7361db I'm ready to call this one done.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
346691243 https://github.com/simonw/datasette/issues/86#issuecomment-346691243 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NjY5MTI0Mw== simonw 9599 2017-11-23T20:07:15Z 2017-11-23T20:07:15Z OWNER

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
346530498 https://github.com/simonw/datasette/issues/86#issuecomment-346530498 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NjUzMDQ5OA== simonw 9599 2017-11-23T04:35:07Z 2017-11-23T04:35:07Z OWNER

Here's where I am now. Needs a bit of UI tidy up and it will be good to release:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345559864 https://github.com/simonw/datasette/issues/86#issuecomment-345559864 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTU1OTg2NA== simonw 9599 2017-11-19T23:35:48Z 2017-11-19T23:35:48Z OWNER

I need a nicer abstraction around the concept of filters. It needs to be able to:

  • convert querystring parameters into filters
  • convert filters into a querystring
  • iterate through currently applied filters
  • convert selected filters into a human description (e.g. for a title)
  • expand filters that involve a foreign key
  • add filters
  • remove filters
  • define different types of filters

It should replace my current build_where_clauses implementation, in particular this bit:

https://github.com/simonw/datasette/blob/a5881e105a02830d26f07e98177248d5910893da/datasette/utils.py#L38-L56

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345497689 https://github.com/simonw/datasette/issues/86#issuecomment-345497689 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NzY4OQ== simonw 9599 2017-11-19T07:27:40Z 2017-11-19T07:27:40Z OWNER

I'll have to refactor the foreign key annotating code to be usable in other contexts - at the moment it only works for annotating displays of rows, but I need to use it to resolve selected filters as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345497534 https://github.com/simonw/datasette/issues/86#issuecomment-345497534 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NzUzNA== simonw 9599 2017-11-19T07:23:33Z 2017-11-19T07:23:33Z OWNER

"Tablename: 3,567 rows where status = 3 (published) and n > 55"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345497453 https://github.com/simonw/datasette/issues/86#issuecomment-345497453 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NzQ1Mw== simonw 9599 2017-11-19T07:21:22Z 2017-11-19T07:21:22Z OWNER

I'm going to be a bit classier about this and auto generate a title for the page that describes the currently applied filters.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345496540 https://github.com/simonw/datasette/issues/86#issuecomment-345496540 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NjU0MA== simonw 9599 2017-11-19T06:59:40Z 2017-11-19T06:59:40Z OWNER

OK,I've figured out how to do an initial version of this without JavaScript. I'll provide three form fields labell d "add filter":

  • a select box of all of the columns
  • a select box of the available operations
  • a value box

Submit those and the site will redirect you to a correctly populated querystring for that filter.

If you have filters applied, those will display as prepopulated form field triples.

For foreign key reference filters, I will display the resolved value next to the text box containing the numeric ID. In the future this can get a select2 style treatment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345494918 https://github.com/simonw/datasette/issues/86#issuecomment-345494918 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDkxOA== simonw 9599 2017-11-19T06:14:17Z 2017-11-19T06:14:17Z OWNER

If the selected relationship is a foreign key reference, we should resolve that foreign key and display it on the page.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345494775 https://github.com/simonw/datasette/issues/86#issuecomment-345494775 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDc3NQ== simonw 9599 2017-11-19T06:09:43Z 2017-11-19T06:09:43Z OWNER

Now that we have foreign key support (#85) this is even more important, since foreign key support actively encourages linking to filtered table views.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  

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