{"id": 273678673, "node_id": "MDU6SXNzdWUyNzM2Nzg2NzM=", "number": 85, "title": "Detect foreign keys and use them to link HTML pages together", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 6, "created_at": "2017-11-14T06:12:05Z", "updated_at": "2017-11-19T06:08:19Z", "closed_at": "2017-11-19T06:08:19Z", "author_association": "OWNER", "pull_request": null, "body": "https://stackoverflow.com/a/44430157/6083 documents the PRAGMA needed to extract foreign key references for a table.\r\n\r\nAt a minimum we can link column values known to be foreign keys to the corresponding row page.\r\nWe could try to summarize the linked row in some way too - somehow extracting a sensible link title, maybe based on additional configuration in the metadata.json file.\r\n\r\nStill todo:\r\n\r\n- [x] Fix it to csvs-to-sqlite refactoring command correctly creates primary key on generated tables\r\n- [x] Ship new csvs-to-sqlite with refactoring command\r\n- [x] Refactor column logic to be more predictable in our templates (the rowid special case)\r\n- [x] Mechanism by which table metadata can specify the \"label\" column for a table\r\n- [x] Automatically set the label column as the first column that isn't a primary key (falling back on primary key)\r\n- [x] Code which runs a \"select id, label from table where id in (...)\" query as part of the tableview and populates a lookup dictionary\r\n- [x] Modify templates to use values from that lookup dictionary", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/85/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 273703829, "node_id": "MDU6SXNzdWUyNzM3MDM4Mjk=", "number": 86, "title": "Filter UI on table page", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 10, "created_at": "2017-11-14T08:22:43Z", "updated_at": "2017-11-23T20:34:32Z", "closed_at": "2017-11-23T20:34:32Z", "author_association": "OWNER", "pull_request": null, "body": "A UI for building up simple table queries by adding additional filter rules that get executed as query parameters in the URL.", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/86/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 274662378, "node_id": "MDU6SXNzdWUyNzQ2NjIzNzg=", "number": 113, "title": "Fix the   bug on the database custom SQL query view", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 0, "created_at": "2017-11-16T21:01:26Z", "updated_at": "2017-11-17T15:40:52Z", "closed_at": "2017-11-17T15:40:52Z", "author_association": "OWNER", "pull_request": null, "body": "https://sf-film-locations.now.sh/sf-film-locations-57704b7?sql=select+*+from+Film_Locations_in_San_Francisco\r\n\r\n\"sf-film-locations\"\r\n\r\nThis is the bug I fixed in 01e0c3fa18cd0dd7970e208790ffd683a420c924 - but I only fixed it in one place.", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/113/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 275135535, "node_id": "MDU6SXNzdWUyNzUxMzU1MzU=", "number": 126, "title": "Blog entry announcing foreign key support", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 1, "created_at": "2017-11-19T06:09:06Z", "updated_at": "2017-11-30T16:49:24Z", "closed_at": "2017-11-30T16:49:24Z", "author_association": "OWNER", "pull_request": null, "body": "", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/126/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 275135719, "node_id": "MDU6SXNzdWUyNzUxMzU3MTk=", "number": 127, "title": "Filtered tables should show count of all matching rows, if fast enough", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 2, "created_at": "2017-11-19T06:13:29Z", "updated_at": "2017-11-24T22:02:01Z", "closed_at": "2017-11-24T22:02:01Z", "author_association": "OWNER", "pull_request": null, "body": "Relates to #86. If you are viewing a filtered page e.g. https://fivethirtyeight.datasettes.com/fivethirtyeight-2628db9/bob-ross%2Felements-by-episode?CLOUDS=1 we should show the count of matching rows.\r\n\r\nSince this could be an expensive operation, we will run it with a strict time limit (maybe 50ms). If the time limit is exceeded we will display \"many\" instead, perhaps? Maybe even link to a count(*) query that would get the full 1000ms time limit which the user can click on if they like (that could even Ajax-in the result).", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/127/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 275175929, "node_id": "MDU6SXNzdWUyNzUxNzU5Mjk=", "number": 132, "title": "Row view is not currently expanding foreign keys", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 1, "created_at": "2017-11-19T17:24:25Z", "updated_at": "2017-11-23T21:51:51Z", "closed_at": "2017-11-23T21:51:30Z", "author_association": "OWNER", "pull_request": null, "body": "Eg https://sf-trees.now.sh/sf-trees-ebc2ad9/Street_Tree_List/1", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/132/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 275176006, "node_id": "MDU6SXNzdWUyNzUxNzYwMDY=", "number": 133, "title": "If view is filtered, search should apply within those filtered rows", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 3, "created_at": "2017-11-19T17:25:36Z", "updated_at": "2017-11-24T22:30:32Z", "closed_at": "2017-11-24T22:30:15Z", "author_association": "OWNER", "pull_request": null, "body": "Eg on https://sf-trees.now.sh/sf-trees-ebc2ad9/Street_Tree_List?qSpecies=1", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/133/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 275176094, "node_id": "MDU6SXNzdWUyNzUxNzYwOTQ=", "number": 134, "title": "Filtered table view should show a count", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 1, "created_at": "2017-11-19T17:26:53Z", "updated_at": "2017-11-19T18:10:49Z", "closed_at": "2017-11-19T18:10:49Z", "author_association": "OWNER", "pull_request": null, "body": "Let's do the thing where we attempt to show an accurate count if it can be done in less than 50ms", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/134/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 276476670, "node_id": "MDU6SXNzdWUyNzY0NzY2NzA=", "number": 147, "title": "Tidy up design of the header of the table page", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 1, "created_at": "2017-11-23T21:52:58Z", "updated_at": "2017-11-24T22:02:46Z", "closed_at": "2017-11-24T22:02:46Z", "author_association": "OWNER", "pull_request": null, "body": "This is a bit messy:\r\n\r\n\"fatal-police-shootings-data__fatal-police-shootings-data\"\r\n\r\nDepends on #127 ", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/147/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 276477888, "node_id": "MDU6SXNzdWUyNzY0Nzc4ODg=", "number": 148, "title": "Need a != filter", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 0, "created_at": "2017-11-23T22:05:22Z", "updated_at": "2017-11-23T22:10:02Z", "closed_at": "2017-11-23T22:10:01Z", "author_association": "OWNER", "pull_request": null, "body": "https://datasette-demos.now.sh/sf-trees-ebc2ad9/Street_Tree_List?qCareAssistant=1 shows trees managed by FUF - but how about trees that are NOT managed by FUF?", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/148/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 276704127, "node_id": "MDU6SXNzdWUyNzY3MDQxMjc=", "number": 149, "title": "Update custom SQL results to match new table view header", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": {"value": 2919870, "label": "Foreign key edition"}, "comments": 1, "created_at": "2017-11-24T22:03:59Z", "updated_at": "2017-11-24T22:42:10Z", "closed_at": "2017-11-24T22:42:09Z", "author_association": "OWNER", "pull_request": null, "body": "Follow-on from #147 - the custom SQL results page should more closely match the design of the table view, which now looks like this:\r\n\r\n\"conventional_power_plants_eu__conventional_power_plants_eu__14_rows_where_company____nuon_\"\r\n", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/149/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"}