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 2019-03-17 and issue = 421348146 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 3

issue 1

  • URL hashing now optional: turn on with --config hash_urls:1 (#418) · 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
473717052 https://github.com/simonw/datasette/pull/416#issuecomment-473717052 https://api.github.com/repos/simonw/datasette/issues/416 MDEyOklzc3VlQ29tbWVudDQ3MzcxNzA1Mg== simonw 9599 2019-03-17T21:32:24Z 2019-03-17T21:33:16Z OWNER

Since this feature is now controlled by a config setting, I'm inclined to make it also available via a URL parameter.

If you hit this URL:

/fixtures/table.json?_hash=1

We can redirect to:

/fixtures-c2342/table.json

In this way developers can opt-in to a hashed (and hence far-future cached) response on a per-query basis.

This option won't be available against mutable databases though, which are coming in #419

This means that the hash_urls:1 config basically has the effect of assuming ?_hash=1 on all URLs to mutable databases.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
URL hashing now optional: turn on with --config hash_urls:1 (#418) 421348146  
473715254 https://github.com/simonw/datasette/pull/416#issuecomment-473715254 https://api.github.com/repos/simonw/datasette/issues/416 MDEyOklzc3VlQ29tbWVudDQ3MzcxNTI1NA== simonw 9599 2019-03-17T21:11:37Z 2019-03-17T21:11:37Z OWNER

The code for this has got a bit tricky. I need to make a decision at some point as to if the current request is a hashed_url request (if it includes a DB hash in the URL which is the current correct hash). I then need to be able to use that fact to decide which default TTL value to apply when returning the response.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
URL hashing now optional: turn on with --config hash_urls:1 (#418) 421348146  
473714545 https://github.com/simonw/datasette/pull/416#issuecomment-473714545 https://api.github.com/repos/simonw/datasette/issues/416 MDEyOklzc3VlQ29tbWVudDQ3MzcxNDU0NQ== simonw 9599 2019-03-17T21:03:08Z 2019-03-17T21:04:17Z OWNER

I'm going to introduce a new config setting: default_cache_ttl_hashed - and set the default value for default_cache_ttl to 10s (to protect against dog-piling).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
URL hashing now optional: turn on with --config hash_urls:1 (#418) 421348146  

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