home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where author_association = "CONTRIBUTOR" and "updated_at" is on date 2019-04-29 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, created_at (date), updated_at (date)

issue 4

  • Add register_output_renderer hook 5
  • Column types in inspected metadata 2
  • Add inspect and prepare_sanic hooks 1
  • [WIP] Add primary key to the extra_body_script hook arguments 1

user 1

  • russss 9

author_association 1

  • CONTRIBUTOR · 9 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
487748271 https://github.com/simonw/datasette/pull/441#issuecomment-487748271 https://api.github.com/repos/simonw/datasette/issues/441 MDEyOklzc3VlQ29tbWVudDQ4Nzc0ODI3MQ== russss 45057 2019-04-29T21:20:17Z 2019-04-29T21:20:17Z CONTRIBUTOR

Also I just pushed a change to add registered output renderers to the templates:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add register_output_renderer hook 438437973  
487735247 https://github.com/simonw/datasette/pull/441#issuecomment-487735247 https://api.github.com/repos/simonw/datasette/issues/441 MDEyOklzc3VlQ29tbWVudDQ4NzczNTI0Nw== russss 45057 2019-04-29T20:39:43Z 2019-04-29T20:39:43Z CONTRIBUTOR

I updated the hook to pass the datasette object through now.

You can see the working GeoJSON render function here - the hook function is here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add register_output_renderer hook 438437973  
487724539 https://github.com/simonw/datasette/pull/441#issuecomment-487724539 https://api.github.com/repos/simonw/datasette/issues/441 MDEyOklzc3VlQ29tbWVudDQ4NzcyNDUzOQ== russss 45057 2019-04-29T20:08:32Z 2019-04-29T20:08:32Z CONTRIBUTOR

I also just realised that I should be passing the datasette object into the hook function...as I just found I need it. So hold off merging until I've fixed that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add register_output_renderer hook 438437973  
487723476 https://github.com/simonw/datasette/pull/441#issuecomment-487723476 https://api.github.com/repos/simonw/datasette/issues/441 MDEyOklzc3VlQ29tbWVudDQ4NzcyMzQ3Ng== russss 45057 2019-04-29T20:05:23Z 2019-04-29T20:05:23Z CONTRIBUTOR

This is the minimal example (I also included it in the docs):

```python from datasette import hookimpl

def render_test(args, data, view_name): return {   'body': 'Hello World', 'content_type': 'text/plain' }

@hookimpl def register_output_renderer(): return { 'extension': 'test', 'callback': render_test } ```

I'm working on the GeoJSON one now and it should be ready soon. (I forgot I was going to run into the same problem as before - that Spatialite's stupid binary format isn't WKB and I have no way of altering the query to change that - but I've just managed to write some code to rearrange the bytes from Spatialite blob-geometry into WKB...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add register_output_renderer hook 438437973  
487692377 https://github.com/simonw/datasette/pull/424#issuecomment-487692377 https://api.github.com/repos/simonw/datasette/issues/424 MDEyOklzc3VlQ29tbWVudDQ4NzY5MjM3Nw== russss 45057 2019-04-29T18:30:46Z 2019-04-29T18:30:46Z CONTRIBUTOR

Actually no, I ended up not using the inspected column types in my plugin, and the binary column issue can be solved a lot more simply, so I'll close this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Column types in inspected metadata 427429265  
487689477 https://github.com/simonw/datasette/pull/424#issuecomment-487689477 https://api.github.com/repos/simonw/datasette/issues/424 MDEyOklzc3VlQ29tbWVudDQ4NzY4OTQ3Nw== russss 45057 2019-04-29T18:22:40Z 2019-04-29T18:22:40Z CONTRIBUTOR

This is pretty conflicty because I forgot how to use git fetch. If you're interested in merging this I'll rewrite it against an actual modern checkout...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Column types in inspected metadata 427429265  
487686655 https://github.com/simonw/datasette/pull/441#issuecomment-487686655 https://api.github.com/repos/simonw/datasette/issues/441 MDEyOklzc3VlQ29tbWVudDQ4NzY4NjY1NQ== russss 45057 2019-04-29T18:14:25Z 2019-04-29T18:14:25Z CONTRIBUTOR

Subsidiary note which I forgot in the commit message:

I've decided to give each view a short string name to aid in differentiating which view a hook is being called from. Since hooks are functions and not subclasses, and can get called from different places in the URL hierarchy, it's sometimes difficult to distinguish what data you're actually operating on. I think this will come in handy for other hooks as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add register_output_renderer hook 438437973  
487542486 https://github.com/simonw/datasette/pull/439#issuecomment-487542486 https://api.github.com/repos/simonw/datasette/issues/439 MDEyOklzc3VlQ29tbWVudDQ4NzU0MjQ4Ng== russss 45057 2019-04-29T11:20:30Z 2019-04-29T11:20:30Z CONTRIBUTOR

Actually I think this is not the whole story because of the rowid issue. I'm going to think about this one a bit more.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
[WIP] Add primary key to the extra_body_script hook arguments 438240541  
487537452 https://github.com/simonw/datasette/pull/437#issuecomment-487537452 https://api.github.com/repos/simonw/datasette/issues/437 MDEyOklzc3VlQ29tbWVudDQ4NzUzNzQ1Mg== russss 45057 2019-04-29T10:58:49Z 2019-04-29T10:58:49Z CONTRIBUTOR

I've just spotted that this implements #215.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add inspect and prepare_sanic hooks 438048318  

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