home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 267759136 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 9

issue 1

  • Config file with support for defining canned queries · 9 ✖

author_association 1

  • OWNER 9
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
349406761 https://github.com/simonw/datasette/issues/20#issuecomment-349406761 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0OTQwNjc2MQ== simonw 9599 2017-12-05T19:03:06Z 2017-12-05T19:03:06Z OWNER

Demo: https://timezones-api.now.sh/timezones-3cb9f64/by_point

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
349383276 https://github.com/simonw/datasette/issues/20#issuecomment-349383276 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0OTM4MzI3Ng== simonw 9599 2017-12-05T17:45:20Z 2017-12-05T17:45:20Z OWNER

http://datasette.readthedocs.io/en/latest/sql_queries.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
349359498 https://github.com/simonw/datasette/issues/20#issuecomment-349359498 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0OTM1OTQ5OA== simonw 9599 2017-12-05T16:30:06Z 2017-12-05T16:30:06Z OWNER

Named canned queries can now be defined in metadata.json like this:

    {
        "databases": {
            "timezones": {
                "queries": {
                    "timezone_for_point": "select tzid from timezones ..."
                }
            }
        }
    }

These will be shown in a new "Queries" section beneath "Views" on the database page.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
349027974 https://github.com/simonw/datasette/issues/20#issuecomment-349027974 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0OTAyNzk3NA== simonw 9599 2017-12-04T17:01:19Z 2017-12-04T17:01:19Z OWNER

This is also a good opportunity to re-factor out a separate query.html template - right now the database.html template is doing two jobs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
348860623 https://github.com/simonw/datasette/issues/20#issuecomment-348860623 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0ODg2MDYyMw== simonw 9599 2017-12-04T04:56:21Z 2017-12-04T04:56:21Z OWNER

While I'm doing this, I could add per-database and per-table metadata too ala #68

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
348420955 https://github.com/simonw/datasette/issues/20#issuecomment-348420955 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0ODQyMDk1NQ== simonw 9599 2017-12-01T07:21:08Z 2017-12-01T07:21:08Z OWNER

I'll use the existing metadata.json file:

{
    "databases": {
        "mydb": {
            "queries": {
                 "custom_thingy": {...

The query definition can either be just a string of SQL, or it can be an object with a sql key and optional title and description keys.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
348420129 https://github.com/simonw/datasette/issues/20#issuecomment-348420129 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0ODQyMDEyOQ== simonw 9599 2017-12-01T07:16:25Z 2017-12-01T07:16:25Z OWNER

I've found some examples of canned queries I want to support that can't be represented as views, so I'm going to reopen this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
343581130 https://github.com/simonw/datasette/issues/20#issuecomment-343581130 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDM0MzU4MTEzMA== simonw 9599 2017-11-10T20:44:38Z 2017-11-10T20:44:38Z OWNER

I'm going to handle this a different way. I'm going to support a local history of your own queries stored in localStorage, but if you want to share a query you have to do it with a URL.

If people really want canned query support, they can do that using custom templates - see #12 - or by adding views to their database before they publish it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  
338769538 https://github.com/simonw/datasette/issues/20#issuecomment-338769538 https://api.github.com/repos/simonw/datasette/issues/20 MDEyOklzc3VlQ29tbWVudDMzODc2OTUzOA== simonw 9599 2017-10-23T19:25:55Z 2017-10-23T19:25:55Z OWNER

Maybe this should be handled by views instead?

https://stateless-datasets-wreplxalgu.now.sh/ lists some views

https://stateless-datasets-wreplxalgu.now.sh/?sql=select%20*%20from%20%22Order%20Subtotals%22 is an example showing the content of a view.

What would the URL to views be? I don't think a view can share a name with a table, so the same URL scheme could work for both.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Config file with support for defining canned queries 267759136  

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