home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 636369978

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/782#issuecomment-636369978 https://api.github.com/repos/simonw/datasette/issues/782 636369978 MDEyOklzc3VlQ29tbWVudDYzNjM2OTk3OA== 9599 2020-05-30T18:50:31Z 2020-05-30T18:50:31Z OWNER

Here's the default JSON at the moment: https://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2

json { "database": "fixtures", "table": "compound_three_primary_keys", "is_view": false, "human_description_en": "", "rows": [ [ "a", "a", "a", "a-a-a" ], [ "a", "a", "b", "a-a-b" ] ], "truncated": false, "filtered_table_rows_count": 1001, "expanded_columns": [], "expandable_columns": [], "columns": [ "pk1", "pk2", "pk3", "content" ], "primary_keys": [ "pk1", "pk2", "pk3" ], "units": {}, "query": { "sql": "select pk1, pk2, pk3, content from compound_three_primary_keys order by pk1, pk2, pk3 limit 3", "params": {} }, "facet_results": {}, "suggested_facets": [ { "name": "pk1", "toggle_url": "http://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2&_facet=pk1" }, { "name": "pk2", "toggle_url": "http://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2&_facet=pk2" }, { "name": "pk3", "toggle_url": "http://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2&_facet=pk3" } ], "next": "a,a,b", "next_url": "http://latest.datasette.io/fixtures/compound_three_primary_keys.json?_size=2&_next=a%2Ca%2Cb", "query_ms": 17.56119728088379, "source": "tests/fixtures.py", "source_url": "https://github.com/simonw/datasette/blob/master/tests/fixtures.py", "license": "Apache License 2.0", "license_url": "https://github.com/simonw/datasette/blob/master/LICENSE" } There's a lot of stuff in there. This increases the risk that future minor changes might break existing API consumers.

It returns rows as a list of lists of values, and expects you to correlate these with the list of columns. I originally designed it like this because I thought this was a more efficient representation than repeating the column names in a dictionary for every row. With hindsight this was a bad optimization - I always use ?shape=array because it's more convenient, and gzip encoding of the response means there's no bandwidth saving. Users who want that efficiency should request it using a custom ?_shape=.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
627794879  
Powered by Datasette · Queries took 0.793ms · About: github-to-sqlite