home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where "created_at" is on date 2019-11-03 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 7

  • retweets-of-me command 4
  • Mechanism for customizing the SQL used to select specific columns in the table view 1
  • Command for running a search and saving tweets for that search 1
  • Add "incomplete" boolean to users table for incomplete profiles 1
  • Utility mechanism for plugins to render templates 1
  • stargazers command, refs #4 1
  • Basic join support for table view 1

author_association 2

  • MEMBER 7
  • OWNER 3

user 1

  • simonw 10
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
549169101 https://github.com/simonw/datasette/issues/292#issuecomment-549169101 https://api.github.com/repos/simonw/datasette/issues/292 MDEyOklzc3VlQ29tbWVudDU0OTE2OTEwMQ== simonw 9599 2019-11-03T19:17:08Z 2019-11-03T19:17:16Z OWNER

A good basic starting point for this would be to ignore the ability to add custom SQL fragments and instead focus on being able to show and hide specific columns. This will play particularly well with #613.

Proposed syntax for that:

/db/table?_col=id&_col=name - just show the id and name columns /db/table?_nocol=extras&_nocol=age - show all columns except for extras and age

I don't think it makes sense to allow both ?_col= and ?_nocol= arguments in the same request, so if you provide both I think we throw a 400 error.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for customizing the SQL used to select specific columns in the table view 326800219  
549168834 https://github.com/simonw/datasette/issues/613#issuecomment-549168834 https://api.github.com/repos/simonw/datasette/issues/613 MDEyOklzc3VlQ29tbWVudDU0OTE2ODgzNA== simonw 9599 2019-11-03T19:14:01Z 2019-11-03T19:14:01Z OWNER

Consider https://latest.datasette.io/fixtures/facetable

With ?_join=city_id the underlying query would become this:

select facetable.pk as 'facetable.pk', facetable.created as 'facetable.created', facetable.planet_int as 'facetable.planet_int', facetable.on_earth as 'facetable.on_earth', facetable.state as 'facetable.state', facetable.city_id as 'facetable.city_id', facetable.neighborhood as 'facetable.neighborhood', facetable.tags as 'facetable.tags', facetable.complex_array as 'facetable.complex_array', facet_cities.id as 'facet_cities.id', facet_cities.name as 'facet_cities.name' from facetable join facet_cities on facetable.city_id = facet_cities.id https://latest.datasette.io/fixtures?sql=select%0D%0A++facetable.pk+as+%27facetable.pk%27%2C%0D%0A++facetable.created+as+%27facetable.created%27%2C%0D%0A++facetable.planet_int+as+%27facetable.planet_int%27%2C%0D%0A++facetable.on_earth+as+%27facetable.on_earth%27%2C%0D%0A++facetable.state+as+%27facetable.state%27%2C%0D%0A++facetable.city_id+as+%27facetable.city_id%27%2C%0D%0A++facetable.neighborhood+as+%27facetable.neighborhood%27%2C%0D%0A++facetable.tags+as+%27facetable.tags%27%2C%0D%0A++facetable.complex_array+as+%27facetable.complex_array%27%2C%0D%0A++facet_cities.id+as+%27facet_cities.id%27%2C%0D%0A++facet_cities.name+as+%27facet_cities.name%27%0D%0Afrom%0D%0A++facetable%0D%0A++join+facet_cities+on+facetable.city_id+%3D+facet_cities.id

I'm using select foo.bar as 'foo.bar' here to ensure that every column has an unambiguous name, to avoid any weirdness from joining against a table where both tables have a 'name' column.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Basic join support for table view 516874735  
549160499 https://github.com/simonw/datasette/issues/577#issuecomment-549160499 https://api.github.com/repos/simonw/datasette/issues/577 MDEyOklzc3VlQ29tbWVudDU0OTE2MDQ5OQ== simonw 9599 2019-11-03T17:36:59Z 2019-11-03T17:36:59Z OWNER

I think a .render_template() method on the Datasette class would be acceptable, since the purpose of that class will mainly be to provide a documented API for plugins to use: #576

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Utility mechanism for plugins to render templates 497171390  
549096321 https://github.com/dogsheep/twitter-to-sqlite/issues/3#issuecomment-549096321 https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/3 MDEyOklzc3VlQ29tbWVudDU0OTA5NjMyMQ== simonw 9599 2019-11-03T01:27:55Z 2019-11-03T01:28:17Z MEMBER

It would be neat if this could support --since, with that argument automatically finding the maximum tweet ID from a previous search that used the same exact arguments (using the search_runs table).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Command for running a search and saving tweets for that search 488833975  
549095641 https://github.com/dogsheep/twitter-to-sqlite/issues/27#issuecomment-549095641 https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/27 MDEyOklzc3VlQ29tbWVudDU0OTA5NTY0MQ== simonw 9599 2019-11-03T01:12:58Z 2019-11-03T01:12:58Z MEMBER

It looks like Twitter really want you to subscribe to a premium API for this kind of thing and consume retweets via webhooks: https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference

I'm going to give up on this for the moment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
retweets-of-me command 514459062  
549095463 https://github.com/dogsheep/twitter-to-sqlite/issues/27#issuecomment-549095463 https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/27 MDEyOklzc3VlQ29tbWVudDU0OTA5NTQ2Mw== simonw 9599 2019-11-03T01:10:52Z 2019-11-03T01:10:52Z MEMBER

I imagine it won't, since the data I would be recording and then passing to since_id would be the highest ID of my own tweets that have been retweeted at least once. So it won't be able to spot if I should check for fresh retweets of a given tweet.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
retweets-of-me command 514459062  
549095317 https://github.com/dogsheep/twitter-to-sqlite/issues/27#issuecomment-549095317 https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/27 MDEyOklzc3VlQ29tbWVudDU0OTA5NTMxNw== simonw 9599 2019-11-03T01:08:10Z 2019-11-03T01:08:10Z MEMBER

Hmm... one thing that could be useful is that retweets_of_me can support a --since parameter - so if run frequently it should hopefully let us know which tweets we would need to run statuses/retweets/:id.json against.

I'm not sure if the --since parameter would show me a tweet that was previously retweeted but has now been retweeted again. I'll have a bit of a test and see.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
retweets-of-me command 514459062  
549095217 https://github.com/dogsheep/twitter-to-sqlite/issues/27#issuecomment-549095217 https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/27 MDEyOklzc3VlQ29tbWVudDU0OTA5NTIxNw== simonw 9599 2019-11-03T01:06:25Z 2019-11-03T01:06:25Z MEMBER

Wow, that retweets_of_me endpoint is almost completely useless: $ twitter-to-sqlite fetch https://api.twitter.com/1.1/statuses/retweets_of_me.json It returns my own tweets that have been retweeted, but with no indication at all of who retweeted them.

It looks like this needs to be combined with this API - https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets-id - to fetch the details of up to 100 recent users who actually DID retweet an individual status. But that has a one-every-12-seconds rate limit on it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
retweets-of-me command 514459062  
549094229 https://github.com/dogsheep/github-to-sqlite/issues/5#issuecomment-549094229 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/5 MDEyOklzc3VlQ29tbWVudDU0OTA5NDIyOQ== simonw 9599 2019-11-03T00:44:03Z 2019-11-03T00:44:03Z MEMBER

Might not need an incomplete boolean - may be possible to handle this with alter=True and then by filtering for users with null values in certain columns.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add "incomplete" boolean to users table for incomplete profiles 493671014  
549094195 https://github.com/dogsheep/github-to-sqlite/pull/8#issuecomment-549094195 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/8 MDEyOklzc3VlQ29tbWVudDU0OTA5NDE5NQ== simonw 9599 2019-11-03T00:43:16Z 2019-11-03T00:43:28Z MEMBER

Also need to take #5 into account - if this command creates incomplete user records, how do we repair them?

And make sure that if we run this command first any future commands that populate users don't break (probably just a case of using alter=True in a few places).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
stargazers command, refs #4 516763727  

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