home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 534530973 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 2

issue 1

  • Reduce table counts on index page with many databases · 2 ✖

author_association 1

  • OWNER 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
592798079 https://github.com/simonw/datasette/issues/649#issuecomment-592798079 https://api.github.com/repos/simonw/datasette/issues/649 MDEyOklzc3VlQ29tbWVudDU5Mjc5ODA3OQ== simonw 9599 2020-02-29T01:00:16Z 2020-02-29T01:00:16Z OWNER

I tried this out in https://github.com/simonw/datasette/commit/34bc16aa591a2f02b2bb33277d33e5bccfb95569 with an upper limit of 100MB and it worked an absolute treat against my personal Dogsheep.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Reduce table counts on index page with many databases 534530973  
562940252 https://github.com/simonw/datasette/issues/649#issuecomment-562940252 https://api.github.com/repos/simonw/datasette/issues/649 MDEyOklzc3VlQ29tbWVudDU2Mjk0MDI1Mg== simonw 9599 2019-12-08T11:59:52Z 2019-12-08T12:00:12Z OWNER

The easiest solution would be to only show counts on the index pages for immutable (-i) databases.

I don't like this, because the most common uses of Datasette don't in my opinion justify it. Most of the time Datasette will be running against a single, small, mutable database. I'd like to show counts in that case.

Some options:

  • disable counts on the index page for mutable databases of more than one is attached
  • disable counts on the index page for databases where the file in disk is larger than a specified threshold (maybe 10MB? I'm making up this number)
  • implement an overall timer which cuts off table counting once the sum of time spent on it has gone beyond a second

Worth prototyping a bit to see what works best.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Reduce table counts on index page with many databases 534530973  

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