home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 329661905 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 5

issue 1

  • Custom URL routing with independent tests · 5 ✖

author_association 1

  • OWNER 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
395463497 https://github.com/simonw/datasette/issues/306#issuecomment-395463497 https://api.github.com/repos/simonw/datasette/issues/306 MDEyOklzc3VlQ29tbWVudDM5NTQ2MzQ5Nw== simonw 9599 2018-06-07T15:29:28Z 2018-06-07T15:29:28Z OWNER

I started sketching this out in a branch, see pull request #307 - but I've decided I don't like it. I'm going to close this ticket and stick with regular expression URL routing for the moment. If I change my mind in the future the code in #307 lives in separate files (datasette/routes.py and tests/test_routes.py) so bringing it back into the project will be trivial.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Custom URL routing with independent tests 329661905  
394895750 https://github.com/simonw/datasette/issues/306#issuecomment-394895750 https://api.github.com/repos/simonw/datasette/issues/306 MDEyOklzc3VlQ29tbWVudDM5NDg5NTc1MA== simonw 9599 2018-06-05T23:48:06Z 2018-06-06T23:50:31Z OWNER

A neat trick could be that if the router returns a redirect it could then resolve that redirect to see if it will 404 (or redirect itself) before returning that response.

This would need its own counter to guard against infinite redirects.

I'm not going to do this though: any view that results in a chain of redirects like this is a bug that should be fixed at the source.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Custom URL routing with independent tests 329661905  
394894910 https://github.com/simonw/datasette/issues/306#issuecomment-394894910 https://api.github.com/repos/simonw/datasette/issues/306 MDEyOklzc3VlQ29tbWVudDM5NDg5NDkxMA== simonw 9599 2018-06-05T23:43:18Z 2018-06-05T23:49:41Z OWNER

I'm going to use a named tuple for the output. That way I can support either tuple destructing or explicit property access on the returned value.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Custom URL routing with independent tests 329661905  
394895267 https://github.com/simonw/datasette/issues/306#issuecomment-394895267 https://api.github.com/repos/simonw/datasette/issues/306 MDEyOklzc3VlQ29tbWVudDM5NDg5NTI2Nw== simonw 9599 2018-06-05T23:45:26Z 2018-06-05T23:45:26Z OWNER

To support a future where Datasette is an ASGI app that can be attached to a URL within a larger application the routing function should have the option to accept a path prefix which will then be automatically attached to any resulting redirects.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Custom URL routing with independent tests 329661905  
394894500 https://github.com/simonw/datasette/issues/306#issuecomment-394894500 https://api.github.com/repos/simonw/datasette/issues/306 MDEyOklzc3VlQ29tbWVudDM5NDg5NDUwMA== simonw 9599 2018-06-05T23:40:40Z 2018-06-05T23:40:40Z OWNER

Input: - function that says if a name is a valid database - Function that says if a table exists - URL

Output: - view class - Arguments - Redirect (if it should redirect)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Custom URL routing with independent tests 329661905  

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