{"html_url": "https://github.com/simonw/datasette/issues/135#issuecomment-349861461", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/135", "id": 349861461, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTg2MTQ2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T04:43:12Z", "updated_at": "2017-12-07T04:43:12Z", "author_association": "OWNER", "body": "This query looks like it does the right thing:\r\n\r\n select * from sqlite_master\r\n where rootpage = 0\r\n and (\r\n sql like '%VIRTUAL TABLE%USING FTS%content=\"ElementaryGeometries\"%'\r\n or (\r\n tbl_name = \"ElementaryGeometries\"\r\n and sql like '%VIRTUAL TABLE%USING FTS%'\r\n )\r\n ) \r\n\r\nAgainst a table that should not be shown as FTS: https://timezones-now-hrjgkinozh.now.sh/timezones-0d61a90?sql=++++++++select+*+from+sqlite_master%0D%0A++++++++++++where+rootpage+%3D+0%0D%0A++++++++++++and+%28%0D%0A++++++++++++++++sql+like+%27%25VIRTUAL+TABLE%25USING+FTS%25content%3D%22ElementaryGeometries%22%25%27%0D%0A++++++++++++++++or+%28%0D%0A++++++++++++++++++tbl_name+%3D+%22ElementaryGeometries%22%0D%0A++++++++++++++++++and+sql+like+%27%25VIRTUAL+TABLE%25USING+FTS%25%27%0D%0A++++++++++++++++%29%0D%0A++++++++++++%29+\r\n\r\nAgainst a table that SHOULD match: https://sf-trees.now.sh/sf-trees-ebc2ad9?sql=++++++++select+*+from+sqlite_master%0D%0A++++++++++++where+rootpage+%3D+0%0D%0A++++++++++++and+%28%0D%0A++++++++++++++++sql+like+%27%25VIRTUAL+TABLE%25USING+FTS%25content%3D%22Street_Tree_List_fts%22%25%27%0D%0A++++++++++++++++or+%28%0D%0A++++++++++++++++++tbl_name+%3D+%22Street_Tree_List_fts%22%0D%0A++++++++++++++++++and+sql+like+%27%25VIRTUAL+TABLE%25USING+FTS%25%27%0D%0A++++++++++++++++%29%0D%0A++++++++++++%29+", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275179724, "label": "?_search=x should work if used directly against a FTS virtual table"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/158#issuecomment-349868849", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/158", "id": 349868849, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTg2ODg0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T05:41:08Z", "updated_at": "2017-12-07T05:41:08Z", "author_association": "OWNER", "body": "I'm happy with this - we have extra_head, content, body_class and title blocks which should provide enough hooks for most reasonable customizations.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 278190981, "label": "Ensure default templates are designed to be extended"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/153#issuecomment-349874052", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/153", "id": 349874052, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTg3NDA1Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T06:17:33Z", "updated_at": "2017-12-07T06:17:33Z", "author_association": "OWNER", "body": "In #159 I added a mechanism for easily customizing per-column displays, and I've added documentation showing an example of using this mechanism to set certain columns to display as unescaped HTML: http://datasette.readthedocs.io/en/latest/custom_templates.html#custom-templates\r\n\r\nThis fixes item 3, so I'm closing this ticket!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276842536, "label": "Ability to customize presentation of specific columns in HTML view"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/164#issuecomment-349874709", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/164", "id": 349874709, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTg3NDcwOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T06:22:10Z", "updated_at": "2017-12-07T06:22:10Z", "author_association": "OWNER", "body": "Example usage:\r\n\r\n datasette skeleton parlgov.db -m parlgov.json\r\n\r\nGenerates a `parlgov.json` file containing this:\r\n\r\n {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null,\r\n \"databases\": {\r\n \"parlgov\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null,\r\n \"queries\": {},\r\n \"tables\": {\r\n \"info_data_source\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_castles_mair\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_chess\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_huber_inglehart\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"info_table\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_euprofiler\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"party_family\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"info_id\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"sqlite_stat1\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_benoit_laver\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_country_iso\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"viewcalc_party_position\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"viewcalc_election_parameter\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"viewcalc_parliament_composition\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"viewcalc_country_year_share\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"election\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"politician_president\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"party_name_change\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_commissioner_doering\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_ray\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"party_change\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"cabinet_party\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_ees\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"party\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"external_party_cmp\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"country\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"cabinet\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"info_variable\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n },\r\n \"election_result\": {\r\n \"title\": null,\r\n \"description\": null,\r\n \"description_html\": null,\r\n \"license\": null,\r\n \"license_url\": null,\r\n \"source\": null,\r\n \"source_url\": null\r\n }\r\n }\r\n }\r\n }\r\n }\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280013907, "label": "datasette skeleton command for kick-starting database and table metadata"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/164#issuecomment-349874844", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/164", "id": 349874844, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTg3NDg0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T06:22:58Z", "updated_at": "2017-12-07T06:22:58Z", "author_association": "OWNER", "body": "This metadata doesn't yet do anything - need to implement #165", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280013907, "label": "datasette skeleton command for kick-starting database and table metadata"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/165#issuecomment-350026183", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/165", "id": 350026183, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDAyNjE4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T16:47:46Z", "updated_at": "2017-12-07T16:47:46Z", "author_association": "OWNER", "body": "Here's an example metadata.json file illustrating custom per-database and per-\r\ntable metadata:\r\n\r\n {\r\n \"title\": \"Overall datasette title\",\r\n \"description_html\": \"This is a description with HTML.\",\r\n \"databases\": {\r\n \"db1\": {\r\n \"title\": \"First database\",\r\n \"description\": \"This is a string description & has no HTML\",\r\n \"license_url\": \"http://example.com/\",\r\n \t\t\"license\": \"The example license\",\r\n \"queries\": {\r\n \t\"canned_query\": \"select * from table1 limit 3;\"\r\n },\r\n \"tables\": {\r\n \"table1\": {\r\n \"title\": \"Custom title for table1\",\r\n \"description\": \"Tables can have descriptions too\",\r\n \"source\": \"This has a custom source\",\r\n \"source_url\": \"http://example.com/\"\r\n }\r\n }\r\n }\r\n }\r\n }", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280014287, "label": "metadata.json support for per-database and per-table information"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/165#issuecomment-350026452", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/165", "id": 350026452, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDAyNjQ1Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T16:48:34Z", "updated_at": "2017-12-07T16:48:34Z", "author_association": "OWNER", "body": "Needs documentation, see #166 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280014287, "label": "metadata.json support for per-database and per-table information"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/166#issuecomment-350035741", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/166", "id": 350035741, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDAzNTc0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T17:20:35Z", "updated_at": "2017-12-07T17:20:35Z", "author_association": "OWNER", "body": "http://datasette.readthedocs.io/en/latest/metadata.html\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280023225, "label": "Documentation for metadata.json and datasette skeleton"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/161#issuecomment-350108113", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/161", "id": 350108113, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDEwODExMw==", "user": {"value": 388154, "label": "wsxiaoys"}, "created_at": "2017-12-07T22:02:24Z", "updated_at": "2017-12-07T22:02:24Z", "author_association": "NONE", "body": "It's not throwing the validation error anymore, but i still cannot run following with query:\r\n```\r\nWITH RECURSIVE cnt(x) AS (SELECT 1 UNION ALL SELECT x+1 FROM cnt LIMIT 10) SELECT x FROM cnt;\r\n```\r\n\r\nI got `near \"WITH\": syntax error`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 278814220, "label": "Support WITH query "}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/167#issuecomment-350125953", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/167", "id": 350125953, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDEyNTk1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-07T23:25:28Z", "updated_at": "2017-12-07T23:25:28Z", "author_association": "OWNER", "body": "My column/row HTML display logic has got way too convoluted. This is a sign I need to add proper unit tests for it and clean it up.\r\n\r\nThe complexity comes from:\r\n\r\n* Displaying a rowid for tables that do not have a primary key\r\n* Showing an additional Link column for rows with a primary key\r\n* Not displaying that Link column on the individual row pages\r\n* Trying to get foreign keys working correctly in all cases, e.g. #152 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280315352, "label": "Nasty bug: last column not being correctly displayed"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/161#issuecomment-350158037", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/161", "id": 350158037, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDE1ODAzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-08T02:52:34Z", "updated_at": "2017-12-08T02:52:34Z", "author_association": "OWNER", "body": "That might mean your version of SQLite doesn't support that syntax. Unfortunately the version bundled with Python is a bit old - the one built by the Dockerfile in this repo should handle it though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 278814220, "label": "Support WITH query "}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/161#issuecomment-350182904", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/161", "id": 350182904, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDE4MjkwNA==", "user": {"value": 388154, "label": "wsxiaoys"}, "created_at": "2017-12-08T06:18:12Z", "updated_at": "2017-12-08T06:18:12Z", "author_association": "NONE", "body": "You're right..got this resolved after upgrading the sqlite version.\r\n\r\nThanks you!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 278814220, "label": "Support WITH query "}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/141#issuecomment-350292364", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/141", "id": 350292364, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDI5MjM2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-08T15:33:18Z", "updated_at": "2017-12-08T15:33:18Z", "author_association": "OWNER", "body": "I can emulate this on OS X using a disk image (Disk Utility -> File -> New Image -> Blank Image...) - once mounted, I get the following:\r\n\r\n >>> os.link('/tmp/hello', '/Volumes/Untitled/hello')\r\n Traceback (most recent call last):\r\n File \"\", line 1, in \r\n OSError: [Errno 18] Cross-device link: '/tmp/hello' -> '/Volumes/Untitled/hello'\r\n\r\nI can simulate that in a mock like this:\r\n\r\n\t>>> from unittest.mock import patch\r\n\t>>> @patch('os.link')\r\n\t... def test_link(mock_link):\r\n\t... mock_link.side_effect = OSError\r\n\t... mock_link()\r\n\t... \r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275814941, "label": "datasette publish can fail if /tmp is on a different device"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/141#issuecomment-350301248", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/141", "id": 350301248, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDMwMTI0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-08T16:07:04Z", "updated_at": "2017-12-08T16:07:04Z", "author_association": "OWNER", "body": "This fix should work, please have a go with latest master and let me know if you run into any problems.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275814941, "label": "datasette publish can fail if /tmp is on a different device"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/154#issuecomment-350302417", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/154", "id": 350302417, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDMwMjQxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-08T16:11:24Z", "updated_at": "2017-12-08T16:11:24Z", "author_association": "OWNER", "body": "I think I'll do this as a custom Jinja template filter. That way template authors can re-use it for their own static files if they want.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276873891, "label": "Datasette CSS should include content hash in the URL"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/154#issuecomment-350323722", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/154", "id": 350323722, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDMyMzcyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-08T17:35:25Z", "updated_at": "2017-12-08T17:35:25Z", "author_association": "OWNER", "body": "If I do this as a querystring parameter I won't need to worry about URL routing.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276873891, "label": "Datasette CSS should include content hash in the URL"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/pull/168#issuecomment-350413422", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/168", "id": 350413422, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDQxMzQyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T01:33:40Z", "updated_at": "2017-12-09T01:33:40Z", "author_association": "OWNER", "body": "https://github.com/channelcat/sanic/releases/tag/0.7.0", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280662866, "label": "Upgrade to Sanic 0.7.0"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/167#issuecomment-350421661", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/167", "id": 350421661, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDQyMTY2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T03:52:46Z", "updated_at": "2017-12-09T03:52:46Z", "author_association": "OWNER", "body": "Input: results from the database, foreign key definitions, primary key definitions, type of page\r\n\r\nOutput: display_columns and display_rows", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280315352, "label": "Nasty bug: last column not being correctly displayed"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/167#issuecomment-350424595", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/167", "id": 350424595, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDQyNDU5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T05:08:27Z", "updated_at": "2017-12-09T05:08:27Z", "author_association": "OWNER", "body": "Perhaps the row.html and table.html templates should be passed the same data but should themselves decide if they will display the Link column ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280315352, "label": "Nasty bug: last column not being correctly displayed"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/160#issuecomment-350496258", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/160", "id": 350496258, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDQ5NjI1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T18:29:28Z", "updated_at": "2017-12-09T18:29:28Z", "author_association": "OWNER", "body": "Example usage:\r\n\r\n datasette package --static css:extra-css/ --static js:extra-js/ \\\r\n \tsf-trees.db --template-dir templates/ --tag sf-trees --branch master\r\n\r\nThis creates a local Docker image that includes copies of the templates/,\r\nextra-css/ and extra-js/ directories. You can then run it like this:\r\n\r\n\tdocker run -p 8001:8001 sf-trees\r\n\r\nFor publishing to Zeit now:\r\n\r\n\tdatasette publish now --static css:extra-css/ --static js:extra-js/ \\\r\n\t\tsf-trees.db --template-dir templates/ --name sf-trees --branch master\r\n\r\nExample: https://sf-trees-wbihszoazc.now.sh/sf-trees-02c8ef1/Street_Tree_List\r\n\r\nFor publishing to Heroku:\r\n\r\n\tdatasette publish heroku --static css:extra-css/ --static js:extra-js/ \\\r\n\t\tsf-trees.db --template-dir templates/ --branch master\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 278208011, "label": "Ability to bundle and serve additional static files"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/157#issuecomment-350496277", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/157", "id": 350496277, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDQ5NjI3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T18:29:41Z", "updated_at": "2017-12-09T18:29:41Z", "author_association": "OWNER", "body": "Example usage:\r\n\r\n datasette package --static css:extra-css/ --static js:extra-js/ \\\r\n \tsf-trees.db --template-dir templates/ --tag sf-trees --branch master\r\n\r\nThis creates a local Docker image that includes copies of the templates/,\r\nextra-css/ and extra-js/ directories. You can then run it like this:\r\n\r\n\tdocker run -p 8001:8001 sf-trees\r\n\r\nFor publishing to Zeit now:\r\n\r\n\tdatasette publish now --static css:extra-css/ --static js:extra-js/ \\\r\n\t\tsf-trees.db --template-dir templates/ --name sf-trees --branch master\r\n\r\nExample: https://sf-trees-wbihszoazc.now.sh/sf-trees-02c8ef1/Street_Tree_List\r\n\r\nFor publishing to Heroku:\r\n\r\n\tdatasette publish heroku --static css:extra-css/ --static js:extra-js/ \\\r\n\t\tsf-trees.db --template-dir templates/ --branch master\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 278190321, "label": "Teach \"datasette publish\" about custom template directories"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/170#issuecomment-350506593", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/170", "id": 350506593, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUwNjU5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T21:25:50Z", "updated_at": "2017-12-09T21:25:50Z", "author_association": "OWNER", "body": "Turns out this is already supported: https://github.com/simonw/datasette/blob/6bdfcf60760c27e29ff34692d06e62b36aeecc56/datasette/app.py#L307", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280745470, "label": "Custom template for named canned query"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/170#issuecomment-350506751", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/170", "id": 350506751, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUwNjc1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T21:28:32Z", "updated_at": "2017-12-09T21:28:32Z", "author_association": "OWNER", "body": "My mistake, that's using the database name - there isn't a way of customizing for a specific named query yet.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280745470, "label": "Custom template for named canned query"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/170#issuecomment-350507155", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/170", "id": 350507155, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUwNzE1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T21:35:30Z", "updated_at": "2017-12-09T21:35:30Z", "author_association": "OWNER", "body": " Canned query page (/mydatabase/canned-query):\r\n query-mydatabase-canned-query.html\r\n query-mydatabase.html\r\n query.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280745470, "label": "Custom template for named canned query"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/171#issuecomment-350508049", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/171", "id": 350508049, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUwODA0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-09T21:50:50Z", "updated_at": "2017-12-09T21:50:50Z", "author_association": "OWNER", "body": "Quoting the new documentation:\r\n\r\nYou can find out which templates were considered for a specific page by viewing\r\nsource on that page and looking for an HTML comment at the bottom. The comment\r\nwill look something like this:\r\n\r\n \r\n\r\nThis example is from the canned query page for a query called \"tz\" in the\r\ndatabase called \"mydb\". The asterisk shows which template was selected - so in\r\nthis case, Datasette found a template file called `query-mydb-tz.html` and\r\nused that - but if that template had not been found, it would have tried for\r\n`query-mydb.html` or the default `query.html`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280745746, "label": "HTML comments specifying custom templates for page"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/167#issuecomment-350515616", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/167", "id": 350515616, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUxNTYxNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T00:21:58Z", "updated_at": "2017-12-10T00:21:58Z", "author_association": "OWNER", "body": "This function signature is pretty gross: https://github.com/simonw/datasette/blob/7a7e4b2ed8c76c6d002a9d707dbc840f6a2abf7f/datasette/app.py#L418", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280315352, "label": "Nasty bug: last column not being correctly displayed"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/167#issuecomment-350515985", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/167", "id": 350515985, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUxNTk4NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T00:28:39Z", "updated_at": "2017-12-10T00:28:39Z", "author_association": "OWNER", "body": "A better alternative:\r\n\r\n```async def display_columns_and_rows(self, database, table, rows, link_column=False):```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280315352, "label": "Nasty bug: last column not being correctly displayed"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/167#issuecomment-350516782", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/167", "id": 350516782, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUxNjc4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T00:48:54Z", "updated_at": "2017-12-10T00:48:54Z", "author_association": "OWNER", "body": "I can simplify this all by dropping the nicety where if a table is using a rowid the Link column is titled rowid instead.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280315352, "label": "Nasty bug: last column not being correctly displayed"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/169#issuecomment-350519711", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/169", "id": 350519711, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUxOTcxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T02:04:56Z", "updated_at": "2017-12-10T02:04:56Z", "author_association": "OWNER", "body": "Done! https://github.com/simonw/datasette/releases/tag/0.14", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 280744309, "label": "Release v0.14 with templates and static files features"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/153#issuecomment-350519736", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/153", "id": 350519736, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUxOTczNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T02:06:01Z", "updated_at": "2017-12-10T02:06:01Z", "author_association": "OWNER", "body": "@ftrain Datasette 0.14 is now released with all of the above: https://github.com/simonw/datasette/releases/tag/0.14", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276842536, "label": "Ability to customize presentation of specific columns in HTML view"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/153#issuecomment-350519821", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/153", "id": 350519821, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUxOTgyMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T02:08:45Z", "updated_at": "2017-12-10T02:08:45Z", "author_association": "OWNER", "body": "Also worth mentioning: as of #160 and #157 the `datasette publish now`, `datasette publish heroku` and `datasette package` commands all know how to bundle up any `--static` or `--template-dir` content and include it in the Docker image / Heroku/Now deployment that gets generated.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276842536, "label": "Ability to customize presentation of specific columns in HTML view"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/42#issuecomment-350521619", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/42", "id": 350521619, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTYxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:02:14Z", "updated_at": "2017-12-10T03:02:14Z", "author_association": "OWNER", "body": "I think the `datasette skeleton` command from #164 makes this obsolete.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 268591332, "label": "Homepage UI for editing metadata file"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/52#issuecomment-350521635", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/52", "id": 350521635, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTYzNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:02:56Z", "updated_at": "2017-12-10T03:02:56Z", "author_association": "OWNER", "body": "I don't think this is necessary.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273026602, "label": "Solution for temporarily uploading DB so it can be built by docker"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/90#issuecomment-350521711", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/90", "id": 350521711, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTcxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:05:48Z", "updated_at": "2017-12-10T03:05:48Z", "author_association": "OWNER", "body": "I fixed that last issue in c195ee4d46f2577b1943836a8270d84c8341d138", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273846123, "label": "datasette publish heroku"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/90#issuecomment-350521736", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/90", "id": 350521736, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTczNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:06:34Z", "updated_at": "2017-12-10T03:06:34Z", "author_association": "OWNER", "body": "Heroku is now in the README as of 6bdfcf60760c27e29ff34692d06e62b36aeecc56", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273846123, "label": "datasette publish heroku"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/91#issuecomment-350521780", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/91", "id": 350521780, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTc4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:07:53Z", "updated_at": "2017-12-10T03:07:53Z", "author_association": "OWNER", "body": "Won't fix - I think the custom templates and static stuff in https://github.com/simonw/datasette/releases/tag/0.14 renders this obsolete.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 273878873, "label": "Option to serve databases from a different prefix, serve regular content elsewhere"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/138#issuecomment-350521806", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/138", "id": 350521806, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTgwNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:08:26Z", "updated_at": "2017-12-10T03:08:36Z", "author_association": "OWNER", "body": "Implemented this in 80bf3afa43e3cb396c7a7c9b168eedbc6fe0fa15 and #165. Didn't use data package though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275476839, "label": "Per-database and per-table metadata, probably using data-package"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/123#issuecomment-350521853", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/123", "id": 350521853, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyMTg1Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T03:09:53Z", "updated_at": "2017-12-10T03:09:53Z", "author_association": "OWNER", "body": "I'm going to keep this separate in csvs-to-sqlite.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275125561, "label": "Datasette serve should accept paths/URLs to CSVs and other file formats"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/121#issuecomment-350527283", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/121", "id": 350527283, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MDUyNzI4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-10T06:00:47Z", "updated_at": "2017-12-10T06:00:47Z", "author_association": "OWNER", "body": "This is also really interesting when combined with the spatialite AsGeoJSON function: http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.0.html#p3misc", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275089535, "label": "?_json=foo&_json=bar query string argument "}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/175#issuecomment-353424169", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/175", "id": 353424169, "node_id": "MDEyOklzc3VlQ29tbWVudDM1MzQyNDE2OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-21T18:33:55Z", "updated_at": "2017-12-21T18:33:55Z", "author_association": "OWNER", "body": "Done - thanks for curating these: https://github.com/topics/automatic-api", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 282971961, "label": "Add project topic \"automatic-api\""}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/120#issuecomment-355487646", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/120", "id": 355487646, "node_id": "MDEyOklzc3VlQ29tbWVudDM1NTQ4NzY0Ng==", "user": {"value": 723567, "label": "nickdirienzo"}, "created_at": "2018-01-05T07:10:12Z", "updated_at": "2018-01-05T07:10:12Z", "author_association": "NONE", "body": "Ah, glad I found this issue. I have private data that I'd like to share to a few different people. Personally, a shared username and password would be sufficient for me, more-or-less Basic Auth. Do you have more complex requirements in mind?\r\n\r\nI'm not sure if \"plugin\" means \"build a plugin\" or \"find a plugin\" or something else entirely. FWIW, I stumbled upon [sanic-auth](https://github.com/pyx/sanic-auth) which looks like a new project to bring some interfaces around auth to sanic, similar to Flask.\r\n\r\nAlternatively, it shouldn't be too bad to add in Basic Auth. If we went down that route, that would probably be best built as a separate package for sanic that `datasette` brings in.\r\n\r\nWhat are your thoughts around this?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275087397, "label": "Plugin that adds an authentication layer of some sort"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/176#issuecomment-356115657", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/176", "id": 356115657, "node_id": "MDEyOklzc3VlQ29tbWVudDM1NjExNTY1Nw==", "user": {"value": 4313116, "label": "wulfmann"}, "created_at": "2018-01-08T22:22:32Z", "updated_at": "2018-01-08T22:22:32Z", "author_association": "NONE", "body": "This project probably would not be the place for that. This is a layer for sqllite specifically. It solves a similar problem as graphql, so adding that here wouldn't make sense.\r\n\r\nHere's an example i found from google that uses micro to run a graphql microservice. you'd just then need to connect your db.\r\nhttps://github.com/timneutkens/micro-graphql", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 285168503, "label": "Add GraphQL endpoint"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/176#issuecomment-356161672", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/176", "id": 356161672, "node_id": "MDEyOklzc3VlQ29tbWVudDM1NjE2MTY3Mg==", "user": {"value": 173848, "label": "yozlet"}, "created_at": "2018-01-09T02:35:35Z", "updated_at": "2018-01-09T02:35:35Z", "author_association": "NONE", "body": "@wulfmann I think I disagree, except I'm not entirely sure what you mean by that first paragraph. The JSON API that Datasette currently exposes is quite different to GraphQL.\r\n\r\nFurthermore, there's no \"just\" about connecting micro-graphql to a DB; at least, no more \"just\" than adding any other API. You still need to configure the schema, which is exactly the kind of thing that Datasette does for JSON API. This is why I think that GraphQL's a good fit here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 285168503, "label": "Add GraphQL endpoint"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/176#issuecomment-356175667", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/176", "id": 356175667, "node_id": "MDEyOklzc3VlQ29tbWVudDM1NjE3NTY2Nw==", "user": {"value": 4313116, "label": "wulfmann"}, "created_at": "2018-01-09T04:19:03Z", "updated_at": "2018-01-09T04:19:03Z", "author_association": "NONE", "body": "@yozlet Yes I think that I was confused when I posted my original comment. I see your main point now and am in agreement.\r\n\r\n", "reactions": "{\"total_count\": 2, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 2, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 285168503, "label": "Add GraphQL endpoint"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/pull/178#issuecomment-357542404", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/178", "id": 357542404, "node_id": "MDEyOklzc3VlQ29tbWVudDM1NzU0MjQwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-01-14T21:06:07Z", "updated_at": "2018-01-14T21:06:07Z", "author_association": "OWNER", "body": "Thanks for catching this, merged!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 287240246, "label": "If metadata exists, add it to heroku launch command"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/176#issuecomment-359697938", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/176", "id": 359697938, "node_id": "MDEyOklzc3VlQ29tbWVudDM1OTY5NzkzOA==", "user": {"value": 7193, "label": "gijs"}, "created_at": "2018-01-23T07:17:56Z", "updated_at": "2018-01-23T07:17:56Z", "author_association": "NONE", "body": "\ud83d\udc4d I'd like this too! ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 285168503, "label": "Add GraphQL endpoint"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/179#issuecomment-360535979", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/179", "id": 360535979, "node_id": "MDEyOklzc3VlQ29tbWVudDM2MDUzNTk3OQ==", "user": {"value": 82988, "label": "psychemedia"}, "created_at": "2018-01-25T17:18:24Z", "updated_at": "2018-01-25T17:18:24Z", "author_association": "CONTRIBUTOR", "body": "To summarise that thread:\r\n\r\n- expose full `metadata.json` object to the index page template, eg to allow tables to be referred to by name;\r\n- ability to import multiple `metadata.json` files, eg to allow metadata files created for a specific SQLite db to be reused in a datasette referring to several database files;\r\n\r\nIt could also be useful to allow users to import a python file containing custom functions that can that be loaded into scope and made available to custom templates.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 288438570, "label": "More metadata options for template authors "}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/176#issuecomment-368625350", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/176", "id": 368625350, "node_id": "MDEyOklzc3VlQ29tbWVudDM2ODYyNTM1MA==", "user": {"value": 7431774, "label": "wuhland"}, "created_at": "2018-02-26T19:44:11Z", "updated_at": "2018-02-26T19:44:11Z", "author_association": "NONE", "body": "great idea!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 285168503, "label": "Add GraphQL endpoint"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-370273359", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 370273359, "node_id": "MDEyOklzc3VlQ29tbWVudDM3MDI3MzM1OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-04T23:10:56Z", "updated_at": "2018-03-04T23:10:56Z", "author_association": "OWNER", "body": "Are you talking specifically about accessing metadata from HTML templates? That makes a lot of sense, I'll think about how this could work.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-370461231", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 370461231, "node_id": "MDEyOklzc3VlQ29tbWVudDM3MDQ2MTIzMQ==", "user": {"value": 222245, "label": "carlmjohnson"}, "created_at": "2018-03-05T15:43:56Z", "updated_at": "2018-03-05T15:44:27Z", "author_association": "NONE", "body": "Yes. I think the simplest implementation is to change lines like\r\n\r\n```python\r\n metadata = self.ds.metadata.get('databases', {}).get(name, {})\r\n```\r\n\r\nto\r\n\r\n```python\r\nmetadata = {\r\n **self.ds.metadata,\r\n **self.ds.metadata.get('databases', {}).get(name, {}),\r\n}\r\n```\r\n\r\nso that specified inner values overwrite outer values, but only if they exist.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/186#issuecomment-374810115", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/186", "id": 374810115, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NDgxMDExNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-21T01:21:13Z", "updated_at": "2018-03-21T01:21:13Z", "author_association": "OWNER", "body": "Hah, this is exactly the opposite of datasette's default approach to caching, which is to cache everything for as long as possible.\r\n\r\nI don't think we'll need to add `Cache-Control: no-cache` headers provided we instead set it up so you can turn off Datasette's caching.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 306811513, "label": "proposal new option to disable user agents cache"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/186#issuecomment-374811114", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/186", "id": 374811114, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NDgxMTExNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-21T01:28:30Z", "updated_at": "2018-03-21T01:28:30Z", "author_association": "OWNER", "body": "We actually have this already:\r\n\r\nhttps://github.com/simonw/datasette/blob/012fc7c5cd3e9160c9a4c19cc964253e97fb054a/datasette/cli.py#L253-L255\r\n\r\nYou can disable the cache headers using the `datasette --debug` option.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 306811513, "label": "proposal new option to disable user agents cache"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/186#issuecomment-374872202", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/186", "id": 374872202, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NDg3MjIwMg==", "user": {"value": 47107, "label": "stefanocudini"}, "created_at": "2018-03-21T09:07:22Z", "updated_at": "2018-03-21T09:07:22Z", "author_association": "NONE", "body": "--debug is perfect tnk", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 306811513, "label": "proposal new option to disable user agents cache"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376585911", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376585911, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjU4NTkxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-27T16:19:43Z", "updated_at": "2018-03-27T16:19:43Z", "author_association": "OWNER", "body": "OK, I have an implementation of this. I realised that not ALL metadata should be inherited: it makes sense for source/source_url/license/license_url to be inherited, but it doesn't make sense for the title and description to be inherited down to the individual databases and tables.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376587017", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376587017, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjU4NzAxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-27T16:22:59Z", "updated_at": "2018-03-27T16:22:59Z", "author_association": "OWNER", "body": "One thing that's missing from this: if you set source/license data at the individual database level they should be inherited by tables within that database.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376589591", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376589591, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjU4OTU5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-27T16:30:51Z", "updated_at": "2018-03-27T16:30:51Z", "author_association": "OWNER", "body": "Also needed: the ability to unset metadata. If the root metadata specifies a license_url it should be possible to set \"license_url\": null on a child database or table. The current implementation will ignore null (or empty string) values and default to the top level value.\r\n\r\nI think the templates themselves should be able to indicate if they want the inherited values or not. That way we could support arbitrary key/values and avoid the application code having special knowledge of license_url etc.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376590265", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376590265, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjU5MDI2NQ==", "user": {"value": 222245, "label": "carlmjohnson"}, "created_at": "2018-03-27T16:32:51Z", "updated_at": "2018-03-27T16:32:51Z", "author_association": "NONE", "body": ">I think the templates themselves should be able to indicate if they want the inherited values or not. That way we could support arbitrary key/values and avoid the application code having special knowledge of license_url etc.\r\n\r\nYes, you could have `metadata` that works like `metadata` does currently and `inherited_metadata` that works with inheritance.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376592044", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376592044, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjU5MjA0NA==", "user": {"value": 222245, "label": "carlmjohnson"}, "created_at": "2018-03-27T16:38:23Z", "updated_at": "2018-03-27T16:38:23Z", "author_association": "NONE", "body": "It would be nice to also allow arbitrary keys (maybe under a parent key called params or something to prevent conflicts). For our datasette project, we just have a bunch of dictionaries defined in the base template for things like site URL and column humanized names: https://github.com/baltimore-sun-data/salaries-datasette/blob/master/templates/base.html It would be cleaner if this were in the metadata.json.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/188#issuecomment-376594727", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/188", "id": 376594727, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjU5NDcyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-27T16:46:49Z", "updated_at": "2018-05-28T21:34:34Z", "author_association": "OWNER", "body": "One point of complexity: datasette can be used to bundle multiple .db files into a single \"app\".\r\n\r\nI think that's OK. We could require that the `datasette_files` table is present in the first database file passed on the command-line. Or we could even construct a search path and consult multiple versions of the table spread across multiple files.\r\n\r\nThat said... any configuration that corresponds to a specific table should live in the same database file as that table.\r\n\r\nDitto for general metadata: if we have license/source information for a specific table or database that information should be able to live in the same .db file as the data.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309047460, "label": "Ability to bundle metadata and templates inside the SQLite file"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376604558", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376604558, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjYwNDU1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-27T17:16:27Z", "updated_at": "2018-03-27T17:16:27Z", "author_association": "OWNER", "body": "I am SO inspired by what you've done with https://salaries.news.baltimoresun.com/ - that's pretty much my ideal use-case for Datasette, and it's by far the most elaborate customization I've seen so far. I'd love to hear other ideas that came up while building that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/185#issuecomment-376614973", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/185", "id": 376614973, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NjYxNDk3Mw==", "user": {"value": 222245, "label": "carlmjohnson"}, "created_at": "2018-03-27T17:49:00Z", "updated_at": "2018-03-27T17:49:00Z", "author_association": "NONE", "body": "@simonw Other than metadata, the biggest item on wishlist for the salaries project was the ability to reorder by column. Of course, that could be done with a custom SQL query, but we didn't want to have to reimplement all the nav/pagination stuff from scratch. \r\n\r\n@carolinp, feel free to add your thoughts.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 299760684, "label": "Metadata should be a nested arbitrary KV store"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-376981291", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 376981291, "node_id": "MDEyOklzc3VlQ29tbWVudDM3Njk4MTI5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T18:06:08Z", "updated_at": "2018-03-28T18:06:08Z", "author_association": "OWNER", "body": "Given how unlikely it is that this will pose a real problem I think I like option 1: enable sort-by-column by default for all tables, then allow power users to instead switch to explicit enabling of the functionality in their `metadata.json` if they know their data is too big.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-376983741", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 376983741, "node_id": "MDEyOklzc3VlQ29tbWVudDM3Njk4Mzc0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T18:12:35Z", "updated_at": "2018-03-28T18:12:35Z", "author_association": "OWNER", "body": "I think this can work with a `?_sort=xxx` parameter - and `?_sort=-xxx` to sort in the opposite direction.\r\n\r\nI'd like to support \"sort by X descending, then by Y ascending if there are dupes for X\" as well. Two ways that could work:\r\n\r\n`?_sort=-xxx,yyy`\r\n\r\nOr...\r\n\r\n`?_sort=-xxx&_sort=yyy`\r\n\r\nThe second option is probably better in that it makes it easier for columns to have a comma in their name.\r\n\r\nIs it possible for a SQLite column to start with a `-` character?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-376986668", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 376986668, "node_id": "MDEyOklzc3VlQ29tbWVudDM3Njk4NjY2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T18:21:53Z", "updated_at": "2018-03-28T18:21:53Z", "author_association": "OWNER", "body": "Might have to do something special to get sort-by-nulls-last: https://stackoverflow.com/questions/12503120/how-to-do-nulls-last-in-sqlite\r\n\r\n order by ifnull(column_name, -999999)\r\n\r\nWould need to figure out a smart way to get the default value - maybe by running a min() or max() against the column first?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377049625", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377049625, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA0OTYyNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T21:52:05Z", "updated_at": "2018-03-28T21:52:05Z", "author_association": "OWNER", "body": "This is a better pattern as you don't have to pick a minimum value:\r\n\r\n ORDER BY CASE WHEN SOMECOL IS NULL THEN 1 ELSE 0 END, SOMECOL", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377050461", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377050461, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA1MDQ2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T21:55:14Z", "updated_at": "2018-03-28T22:06:30Z", "author_association": "OWNER", "body": "I think there are actually four kinds of sort order we need to support;\r\n\r\n* ascending\r\n* descending\r\n* ascending, nulls last\r\n* descending, nulls last\r\n\r\nIt looks like [-blah] is a valid SQLite table name, so mark I descending with a hyphen prefix isn't good.\r\n\r\nInstead, maybe this:\r\n\r\n ?_sort_asc=col1&_sort_desc_nulls_last=col2\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377051018", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377051018, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA1MTAxOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T21:57:20Z", "updated_at": "2018-03-28T22:00:17Z", "author_association": "OWNER", "body": "I'd like to continue to support _next=token pagination even for custom sort orders.\r\n\r\nTo do that I should include rowid (or general primary key) as the tie breaker on all sorts so I can incorporate that it into the _next= token.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377052634", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377052634, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA1MjYzNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T22:03:16Z", "updated_at": "2018-03-28T22:03:16Z", "author_association": "OWNER", "body": "In terms of user interface: the obvious place to put this is as a drop down menu on the column headers.\r\n\r\nThis also means the UI can support combined sort orders. Assuming you are already sorted by county descending and you select the candidate column header, the options could be:\r\n\r\n* sort all by candidate\r\n* sort all by candidate, descending\r\n* sort by county descending, then by candidate\r\n* sort by county descending, then by candidate descending", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377054358", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377054358, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA1NDM1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T22:09:25Z", "updated_at": "2018-03-28T22:09:25Z", "author_association": "OWNER", "body": "I'm tempted to put these verbose sorting options inline in the page HTML but have them in the table footer so they don't clog up the top half of the page with uninteresting links - then use JavaScript to hoik them out into a dropdown menu attached to each column header.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377055663", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377055663, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA1NTY2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T22:14:53Z", "updated_at": "2018-03-28T22:14:53Z", "author_association": "OWNER", "body": "There is one other interesting option for auto-enabling/disabling sort: the inspect command could include data about column index presence and whether or not a column has any null values in it.\r\n\r\nThis would allow us to dynamically include a \"nulls last\" option but only for columns that contain at least one null.\r\n\r\nIt's quite a lot of additional engineering for a very minor feature though, so I think I'll punt on that for the moment.\r\n\r\nWe may find that the _group_count feature can benefit from column value statistics later on though.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377065541", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377065541, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA2NTU0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T22:58:52Z", "updated_at": "2018-03-28T22:58:52Z", "author_association": "OWNER", "body": "This is because the SQL we are using here is:\r\n\r\n select * from compound_primary_key where \"pk1\" > \"d\" and \"pk2\" > \"v\" order by pk1, pk2 limit 101\r\n\r\nThis is incorrect. The correct SQL syntax (according to the example on https://www.sqlite.org/rowvalue.html#scrolling_window_queries ) is:\r\n\r\n select * from compound_primary_key where (\"pk1\", \"pk2\") > (\"d\", \"v\") order by pk1, pk2 limit 101\r\n\r\nBUT... this uses \"row values\" syntax which was only added to SQLite in version 3.15.0 in October 2016: https://sqlite.org/changes.html#version_3_15_0\r\n\r\nThe version on https://datasette-issue-190-compound-pks.now.sh/compound-pks-9aafe8f?sql=select+sqlite_version%28%29%3B is 3.8.7.1 from October 2014.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377066466", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377066466, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA2NjQ2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T23:03:45Z", "updated_at": "2018-03-28T23:03:57Z", "author_association": "OWNER", "body": "Without row values syntax, the necessary SQL to retrieve the next page after `d, v` gets a bit gnarly:\r\n\r\n select * from compound_primary_key\r\n where pk1 >= \"d\" and not (pk1 = \"d\" and pk2 <= \"v\")\r\n order by pk1, pk2\r\n\r\nSee https://datasette-issue-190-compound-pks.now.sh/compound-pks-9aafe8f?sql=select+*+from+compound_primary_key+where+pk1+%3E%3D+%22d%22+and+not+%28pk1+%3D+%22d%22+and+pk2+%3C%3D+%22v%22%29+order+by+pk1%2C+pk2\r\n\r\nThis article was useful for figuring this out: https://use-the-index-luke.com/sql/partial-results/fetch-next-page", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377067541", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377067541, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA2NzU0MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T23:09:18Z", "updated_at": "2018-03-28T23:09:51Z", "author_association": "OWNER", "body": "Here's how I generated the table for testing this with 3 compound primary keys:\r\n\r\n CREATE_SQL = '''\r\n CREATE TABLE compound_three_primary_keys (\r\n pk1 varchar(30),\r\n pk2 varchar(30),\r\n pk3 varchar(30),\r\n content text,\r\n PRIMARY KEY (pk1, pk2, pk3)\r\n );'''\r\n alphabet = 'abcdefghijklmnopqrstuvwxyz'\r\n for a in alphabet:\r\n for b in alphabet:\r\n for c in alphabet:\r\n print('''\r\n INSERT INTO compound_three_primary_keys VALUES ('{}', '{}', '{}', '{}');\r\n '''.strip().format(a, b, c, '{}-{}-{}-{}-{}-{}'.format(a,b,c,a,b,c)))\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377072022", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377072022, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzA3MjAyMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-28T23:32:24Z", "updated_at": "2018-03-28T23:32:24Z", "author_association": "OWNER", "body": "Here's the SQL for a next page with three compound primary keys:\r\n\r\nhttps://datasette-issue-190-compound-pks.now.sh/compound-pks-8e99805?sql=select+*+from+compound_three_primary_keys%0D%0Awhere%0D%0A++%28pk1+%3E+%3Apk1%29%0D%0A++++or%0D%0A++%28pk1+%3D+%3Apk1+and+pk2+%3E+%3Apk2%29%0D%0A++++or%0D%0A++%28pk1+%3D+%3Apk1+and+pk2+%3D+%3Apk2+and+pk3+%3E+%3Apk3%29%0D%0Aorder+by+pk1%2C+pk2%2C+pk3%3B%0D%0A%0D%0A%0D%0A&pk1=a&pk2=d&pk3=v\r\n\r\n```\r\nselect * from compound_three_primary_keys\r\nwhere\r\n (pk1 > :pk1)\r\n or\r\n (pk1 = :pk1 and pk2 > :pk2)\r\n or\r\n (pk1 = :pk1 and pk2 = :pk2 and pk3 > :pk3)\r\norder by pk1, pk2, pk3;\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377362466", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377362466, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzM2MjQ2Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-29T20:29:14Z", "updated_at": "2018-03-29T20:29:14Z", "author_association": "OWNER", "body": "Alternative idea: by default enable all sorting in the UI.\r\n\r\nIf a table has more than 100,000 rows disable sorting UI except for columns that have an index.\r\n\r\nAllow this to be overridden in metadata.json\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377454591", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377454591, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzQ1NDU5MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T06:11:59Z", "updated_at": "2018-03-30T06:11:59Z", "author_association": "OWNER", "body": "Re-opening this issue: my fix doesn't play nicely with extra filter arguments.\r\n\r\nConsider this page: https://datasette-issue-190-compound-pks-not-quite-fixed.now.sh/compound-pks-8e99805/compound_three_primary_keys?content__contains=d\r\n\r\nThe next link is to `?_next=f%2Cz%2Ct&content__contains=z` (that's next of `f,z,t`) but that gives us https://datasette-issue-190-compound-pks-not-quite-fixed.now.sh/compound-pks-8e99805/compound_three_primary_keys?_next=b%2Cx%2Cd&content__contains=d which shows `a,a,d` at the top.\r\n\r\nSure enough, the generated SQL looks like this: https://datasette-issue-190-compound-pks-not-quite-fixed.now.sh/compound-pks-8e99805?sql=select+%2A+from+compound_three_primary_keys+where+%22content%22+like+%3Ap0+and+%28%5Bpk1%5D+%3E+%3Ap0%29%0A++or%0A%28%5Bpk1%5D+%3D+%3Ap0+and+%5Bpk2%5D+%3E+%3Ap1%29%0A++or%0A%28%5Bpk1%5D+%3D+%3Ap0+and+%5Bpk2%5D+%3D+%3Ap1+and+%5Bpk3%5D+%3E+%3Ap2%29+order+by+pk1%2C+pk2%2C+pk3+limit+101&p0=%25d%25&p1=b&p2=x&p3=d\r\n\r\n\tselect * from compound_three_primary_keys where \"content\" like :p0 and ([pk1] > :p0)\r\n\t or\r\n\t([pk1] = :p0 and [pk2] > :p1)\r\n\t or\r\n\t([pk1] = :p0 and [pk2] = :p1 and [pk3] > :p2) order by pk1, pk2, pk3 limit 101\r\n\r\nThe parameters here are confused. The :p0 should be reserved just for the like clause - the other parameters should be p1, p2 and p3 (not p0, p1 and p2).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377457087", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377457087, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzQ1NzA4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T06:30:23Z", "updated_at": "2018-03-30T06:30:23Z", "author_association": "OWNER", "body": "Interestingly, in deploying a copy of the database to demonstrate this final bug fix I had to use the `--force` argument like so:\r\n\r\n datasette publish now --branch=master compound-pks.db --force\r\n\r\nThis is because `now` had already deployed a Dockerfile referencing `--branch=master` once already, so it thought nothing had changed and it could re-use that last deployment.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/190#issuecomment-377457214", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/190", "id": 377457214, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzQ1NzIxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T06:31:15Z", "updated_at": "2018-03-30T06:31:15Z", "author_association": "OWNER", "body": "Fixed! https://datasette-issue-190-compound-pks-second-fix.now.sh/compound-pks-8e99805/compound_three_primary_keys?_next=b%2Cx%2Cd&content__contains=d now correctly shows `b,y,d` as the first row on the page.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309558826, "label": "Keyset pagination doesn't work correctly for compound primary keys"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377459579", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377459579, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzQ1OTU3OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T06:47:52Z", "updated_at": "2018-03-30T06:47:52Z", "author_association": "OWNER", "body": "I'm not entirely sure how to get `_next=` pagination working against sorted collections when a tie-breaker is needed.\r\n\r\nConsider this data:\r\n\r\nhttps://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9?sql=select+rowid%2C+*+from+%5Bnfl-wide-receivers%2Fadvanced-historical%5D%0D%0Aorder+by+case+when+career_ranypa+is+null+then+1+else+0+end%2C+career_ranypa%2C+rowid+limit+11\r\n\r\n![2018-03-29 at 11 46 pm](https://user-images.githubusercontent.com/9599/38127549-790c8bd0-33ab-11e8-8d32-66f5d3847c8a.png)\r\n\r\nIf the page size was set to 9 rather than 11, the page divide would be between those two rows with the same value in the `career_ranypa` column. What would the `?_next=` token look like such that the correct row would be returned?\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377460127", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377460127, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzQ2MDEyNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T06:51:29Z", "updated_at": "2018-03-30T06:51:52Z", "author_association": "OWNER", "body": "The problem is that our `_next=` pagination currently works based on a `>` - but for this case a `>=` for the value is needed combined with a `>` on the tie-breaker (which would be the `rowid` column).\r\n\r\nSo I think this is the right SQL:\r\n\r\n```\r\nselect rowid, * from [nfl-wide-receivers/advanced-historical]\r\nwhere career_ranypa >= -6.331167749 and rowid > 2736\r\norder by case when career_ranypa is null then 1 else 0 end, career_ranypa, rowid limit 11\r\n```\r\n\r\nhttps://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9?sql=select+rowid%2C+*+from+%5Bnfl-wide-receivers%2Fadvanced-historical%5D%0D%0Awhere+career_ranypa+%3E%3D+-6.331167749+and+rowid+%3E+2736%0D%0Aorder+by+case+when+career_ranypa+is+null+then+1+else+0+end%2C+career_ranypa%2C+rowid+limit+11\r\n\r\nBut how do I encode a `_next` token that means \">= X and > Y\"?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377462334", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377462334, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzQ2MjMzNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T07:06:21Z", "updated_at": "2018-03-30T07:06:21Z", "author_association": "OWNER", "body": "Maybe the answer here is that anything that's encoded in the next token is treated as >= with the exception of columns known to be primary keys, which are treated as >", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377546510", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377546510, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzU0NjUxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T15:13:11Z", "updated_at": "2018-03-30T15:13:11Z", "author_association": "OWNER", "body": "Pushed some work-in-progress with failing unit tests here: https://github.com/simonw/datasette/commit/2f8359c6f25768805431c80c74e5ec4213c2b2a6\r\n\r\nHere's a demo: https://datasette-column-sort-wip.now.sh/sortable-4bbaa6f/sortable?_sort=sortable - note that the `_sort_desc` and `_sort_nulls_last` options aren't done yet, plus it doesn't correctly paginate (the `_next` tokens do not yet take sorting into account).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-377547265", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 377547265, "node_id": "MDEyOklzc3VlQ29tbWVudDM3NzU0NzI2NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-03-30T15:16:43Z", "updated_at": "2018-03-30T15:16:43Z", "author_association": "OWNER", "body": "I think this is the right incantation for a \"next\" link: https://datasette-column-sort-wip.now.sh/sortable-4bbaa6f?sql=select+*+from+sortable%0D%0Awhere+sortable+%3C%3D+94%0D%0Aand+%28%0D%0A++%28pk1+%3E+%27d%27%29%0D%0A++or%0D%0A++%28pk1+%3D+%27d%27+and+pk2+%3E+%27w%27%29%0D%0A%29%0D%0Aorder+by+sortable+desc%2C+pk1%2C+pk2%0D%0Alimit+7", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/122#issuecomment-378279612", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/122", "id": 378279612, "node_id": "MDEyOklzc3VlQ29tbWVudDM3ODI3OTYxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-03T14:55:54Z", "updated_at": "2018-04-03T14:55:54Z", "author_association": "OWNER", "body": "The new documentation for the `_shape=` parameter is now live at http://datasette.readthedocs.io/en/latest/json_api.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275092453, "label": "Redesign JSON output, ditch jsono, offer variants controlled by parameter instead"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/183#issuecomment-378281740", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/183", "id": 378281740, "node_id": "MDEyOklzc3VlQ29tbWVudDM3ODI4MTc0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-03T15:01:43Z", "updated_at": "2018-04-03T15:01:43Z", "author_association": "OWNER", "body": "I'm having trouble replicating this bug. In particular, I don't understand what you mean by \"these are then rendered in the datasette query box using single quotes\" - since canned queries aren't displayed in a textarea. Do you have an example database / metadata.json I can use to investigate this further?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 291639118, "label": "Custom Queries - escaping strings"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/pull/181#issuecomment-378293484", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/181", "id": 378293484, "node_id": "MDEyOklzc3VlQ29tbWVudDM3ODI5MzQ4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-03T15:34:29Z", "updated_at": "2018-04-03T15:34:29Z", "author_association": "OWNER", "body": "Here's what this looks like:\r\n\r\n![2018-04-03 at 8 32 am](https://user-images.githubusercontent.com/9599/38259345-9e1c75ea-3719-11e8-83c9-2160c6fa079c.png)\r\n\r\nI need to figure out the right way to handle licensing of bundled software like this - it's MIT licensed which is compatible with Datasette's Apache 2 license, but I feel like bundled licensed software (including codemirror) needs to be recognized in the README or docs somehow.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 289425975, "label": "add \"format sql\" button to query page, uses sql-formatter"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/pull/181#issuecomment-378293599", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/181", "id": 378293599, "node_id": "MDEyOklzc3VlQ29tbWVudDM3ODI5MzU5OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-03T15:34:50Z", "updated_at": "2018-04-03T15:36:58Z", "author_association": "OWNER", "body": "Let's only show the \"Format SQL\" button if the user has JavaScript enabled. We can do that in this code here:\r\n\r\nhttps://github.com/bsmithgall/datasette/blob/4a7151a58d6ab7c8404a91beef7083e8a5807cf8/datasette/templates/_codemirror_foot.html#L14-L21", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 289425975, "label": "add \"format sql\" button to query page, uses sql-formatter"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/pull/181#issuecomment-378295376", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/181", "id": 378295376, "node_id": "MDEyOklzc3VlQ29tbWVudDM3ODI5NTM3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-03T15:39:57Z", "updated_at": "2018-04-03T15:39:57Z", "author_association": "OWNER", "body": "On the licensing front: it looks like the way Django handles this is to keep the licensing header in the files intact, e.g. https://github.com/django/django/blob/6deaddcca367d0143c815aaa42342021baa3b41e/django/contrib/admin/static/admin/js/vendor/jquery/jquery.js\r\n\r\nSo for this change, adding a comment at the top of `sql-formatter.min.js` which references the MIT license would do the trick.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 289425975, "label": "add \"format sql\" button to query page, uses sql-formatter"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/pull/181#issuecomment-378297842", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/181", "id": 378297842, "node_id": "MDEyOklzc3VlQ29tbWVudDM3ODI5Nzg0Mg==", "user": {"value": 1957344, "label": "bsmithgall"}, "created_at": "2018-04-03T15:47:13Z", "updated_at": "2018-04-03T15:47:13Z", "author_association": "NONE", "body": "I can work on that -- would you prefer to inline a `display: hidden` and then have the javascript flip the visibility or include it as css?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 289425975, "label": "add \"format sql\" button to query page, uses sql-formatter"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/193#issuecomment-379142500", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/193", "id": 379142500, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTE0MjUwMA==", "user": {"value": 222245, "label": "carlmjohnson"}, "created_at": "2018-04-06T04:05:58Z", "updated_at": "2018-04-06T04:05:58Z", "author_association": "NONE", "body": "You could try pulling out a validate query strings method. If it fails validation build the error object from the message. If it passes, you only need to go down a happy path. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 310882100, "label": "Cleaner mechanism for handling custom errors"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-379555484", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 379555484, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1NTQ4NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T14:39:57Z", "updated_at": "2018-04-08T14:39:57Z", "author_association": "OWNER", "body": "I'm going to combine the code for explicit sorting with the existing code for _next= pagination - so even tables without an explicit sort order will run through the same code since they are ordered and paginated by primary key.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/48#issuecomment-379556637", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/48", "id": 379556637, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1NjYzNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T14:56:52Z", "updated_at": "2018-04-08T14:56:52Z", "author_association": "OWNER", "body": "It would be useful to have a microbenchmark in place to help understand how much of a performance benefit this would actually provide.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 272391665, "label": "Switch to ujson"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-379556774", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 379556774, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1Njc3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T14:59:05Z", "updated_at": "2018-04-08T14:59:05Z", "author_association": "OWNER", "body": "A common problem with keyset pagination is that it can distort the \"total number of rows\" logic - every time you navigate to a further page the total rows count can decrease due to the extra arguments in the `where` clause. The `filtered_table_rows` value (see #194) calculated using `count_sql` currently has this problem.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/194#issuecomment-379556881", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/194", "id": 379556881, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1Njg4MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:00:48Z", "updated_at": "2018-04-08T15:02:35Z", "author_association": "OWNER", "body": "`table_rows_count` is always the *total* number of rows in the table. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 312312125, "label": "Rename table_rows and filtered_table_rows to have _count suffix"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/194#issuecomment-379556981", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/194", "id": 379556981, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1Njk4MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:02:23Z", "updated_at": "2018-04-08T15:02:23Z", "author_association": "OWNER", "body": "Maybe `table_rows_filtered_count` would be more aesthetically pleasing than `filtered_table_rows_count`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 312312125, "label": "Rename table_rows and filtered_table_rows to have _count suffix"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/195#issuecomment-379557743", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/195", "id": 379557743, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1Nzc0Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:13:18Z", "updated_at": "2018-04-08T15:13:18Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/blob/446d47fdb005b3776bc06ad8d1f44b01fc2e938b/datasette/app.py#L93-L102", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 312313496, "label": "Run pks_for_table in inspect, executing once at build time rather than constantly"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/189#issuecomment-379557982", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/189", "id": 379557982, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1Nzk4Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:16:49Z", "updated_at": "2018-04-08T15:16:49Z", "author_association": "OWNER", "body": "A note about views: a view cannot be paginated using keyset pagination because records returned from a view don't have a primary key - so there's no way to reliably distinguish between _next= records when the sorted column has duplicates with the same value.\r\n\r\nDatasette already takes this into account: views are paginated using offset/limit instead. We can continue to do that even for views that have been sorted using a `_sort` parameter.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 309471814, "label": "Ability to sort (and paginate) by column"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/195#issuecomment-379559074", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/195", "id": 379559074, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1OTA3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:31:49Z", "updated_at": "2018-04-08T15:31:49Z", "author_association": "OWNER", "body": "While I'm at it, doing the same thing for fts_table detection is worth considering:\r\n\r\nhttps://github.com/simonw/datasette/blob/446d47fdb005b3776bc06ad8d1f44b01fc2e938b/datasette/app.py#L598-L603", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 312313496, "label": "Run pks_for_table in inspect, executing once at build time rather than constantly"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/150#issuecomment-379559214", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/150", "id": 379559214, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1OTIxNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:33:58Z", "updated_at": "2018-04-08T15:33:58Z", "author_association": "OWNER", "body": "The single biggest challenge here is expanding foreign key references. This is the blocker that prevents `_group_count` from being useful at the moment.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276704327, "label": "_group_count= feature improvements"}, "performed_via_github_app": null}
{"html_url": "https://github.com/simonw/datasette/issues/150#issuecomment-379559319", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/150", "id": 379559319, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTU1OTMxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-08T15:35:43Z", "updated_at": "2018-04-08T15:35:43Z", "author_association": "OWNER", "body": "From a code point of view, the current mechanism for `_group_count` makes the `TableView` even **more** complicated:\r\n\r\nhttps://github.com/simonw/datasette/blob/446d47fdb005b3776bc06ad8d1f44b01fc2e938b/datasette/app.py#L644-L653\r\n\r\nInstead, I think if `_group_count` is detected we should generate the SQL and then defer to `self.custom_sql`, like we do for canned queries:\r\n\r\nhttps://github.com/simonw/datasette/blob/446d47fdb005b3776bc06ad8d1f44b01fc2e938b/datasette/app.py#L539-L541", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 276704327, "label": "_group_count= feature improvements"}, "performed_via_github_app": null}