home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 961367843 and user = 9599 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 · 4 ✖

issue 1

  • Ability to default to hiding the SQL for a canned query · 4 ✖

author_association 1

  • OWNER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
894607989 https://github.com/simonw/datasette/issues/1422#issuecomment-894607989 https://api.github.com/repos/simonw/datasette/issues/1422 IC_kwDOBm6k_c41UqJ1 simonw 9599 2021-08-07T05:31:57Z 2021-08-07T05:31:57Z OWNER

Demo: https://latest.datasette.io/fixtures/neighborhood_search

Documentation: https://docs.datasette.io/en/latest/sql_queries.html#additional-canned-query-options

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to default to hiding the SQL for a canned query 961367843  
894589140 https://github.com/simonw/datasette/issues/1422#issuecomment-894589140 https://api.github.com/repos/simonw/datasette/issues/1422 IC_kwDOBm6k_c41UljU simonw 9599 2021-08-07T01:58:16Z 2021-08-07T01:58:24Z OWNER

Also need to consider this hidden field - it should pass the _hide_sql or _show_sql parameters depending on the same logic: https://github.com/simonw/datasette/blob/acc22436622ff8476c30acf45ed60f54b4aaa5d9/datasette/templates/query.html#L47-L49

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to default to hiding the SQL for a canned query 961367843  
893131703 https://github.com/simonw/datasette/issues/1422#issuecomment-893131703 https://api.github.com/repos/simonw/datasette/issues/1422 IC_kwDOBm6k_c41PBu3 simonw 9599 2021-08-05T03:16:46Z 2021-08-05T03:16:46Z OWNER

The logic for this is a little bit fiddly, due to the need to switch to using ?_show_sql=1 on the link depending on the context.

  • If metadata says hide and there's no query string, hide and link to ?_show_sql=1
  • If metadata says hide but query string says ?_show_sql=1, show and have hide link linking to URL without ?_show_sql=1
  • Otherwise, show and link to ?_hide_sql=1
  • ... or if that query string is there then hide and link to URL without ?_hide_sql=1
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to default to hiding the SQL for a canned query 961367843  
893122356 https://github.com/simonw/datasette/issues/1422#issuecomment-893122356 https://api.github.com/repos/simonw/datasette/issues/1422 IC_kwDOBm6k_c41O_c0 simonw 9599 2021-08-05T02:52:31Z 2021-08-05T02:52:44Z OWNER

If you do this it should still be possible to view the SQL - which means we need a new parameter. I propose ?_show_sql=1 to over-ride the hidden default.

I think the configuration should use hide_sql: true - looking like this: yaml databases: fixtures: queries: neighborhood_search: hide_sql: true sql: |- select neighborhood, facet_cities.name, state from facetable join facet_cities on facetable.city_id = facet_cities.id where neighborhood like '%' || :text || '%' order by neighborhood title: Search neighborhoods

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to default to hiding the SQL for a canned query 961367843  

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