{"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-338769538", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 338769538, "node_id": "MDEyOklzc3VlQ29tbWVudDMzODc2OTUzOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-10-23T19:25:55Z", "updated_at": "2017-10-23T19:25:55Z", "author_association": "OWNER", "body": "Maybe this should be handled by views instead?\r\n\r\nhttps://stateless-datasets-wreplxalgu.now.sh/ lists some views\r\n\r\nhttps://stateless-datasets-wreplxalgu.now.sh/?sql=select%20*%20from%20%22Order%20Subtotals%22 is an example showing the content of a view.\r\n\r\nWhat would the URL to views be? I don't think a view can share a name with a table, so the same URL scheme could work for both.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-343581130", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 343581130, "node_id": "MDEyOklzc3VlQ29tbWVudDM0MzU4MTEzMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-11-10T20:44:38Z", "updated_at": "2017-11-10T20:44:38Z", "author_association": "OWNER", "body": "I'm going to handle this a different way. I'm going to support a local history of your own queries stored in localStorage, but if you want to share a query you have to do it with a URL.\r\n\r\nIf people really want canned query support, they can do that using custom templates - see #12 - or by adding views to their database before they publish it.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-348420129", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 348420129, "node_id": "MDEyOklzc3VlQ29tbWVudDM0ODQyMDEyOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-01T07:16:25Z", "updated_at": "2017-12-01T07:16:25Z", "author_association": "OWNER", "body": "I've found some examples of canned queries I want to support that can't be represented as views, so I'm going to reopen this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-348420955", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 348420955, "node_id": "MDEyOklzc3VlQ29tbWVudDM0ODQyMDk1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-01T07:21:08Z", "updated_at": "2017-12-01T07:21:08Z", "author_association": "OWNER", "body": "I'll use the existing metadata.json file:\r\n\r\n {\r\n \"databases\": {\r\n \"mydb\": {\r\n \"queries\": {\r\n \"custom_thingy\": {...\r\n\r\nThe query definition can either be just a string of SQL, or it can be an object with a sql key and optional title and description keys.\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-348860623", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 348860623, "node_id": "MDEyOklzc3VlQ29tbWVudDM0ODg2MDYyMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-04T04:56:21Z", "updated_at": "2017-12-04T04:56:21Z", "author_association": "OWNER", "body": "While I'm doing this, I could add per-database and per-table metadata too ala #68", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-349027974", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 349027974, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTAyNzk3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-04T17:01:19Z", "updated_at": "2017-12-04T17:01:19Z", "author_association": "OWNER", "body": " This is also a good opportunity to re-factor out a separate query.html template - right now the database.html template is doing two jobs.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-349359498", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 349359498, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTM1OTQ5OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-05T16:30:06Z", "updated_at": "2017-12-05T16:30:06Z", "author_association": "OWNER", "body": "Named canned queries can now be defined in metadata.json like this:\r\n \r\n {\r\n \"databases\": {\r\n \"timezones\": {\r\n \"queries\": {\r\n \"timezone_for_point\": \"select tzid from timezones ...\"\r\n }\r\n }\r\n }\r\n }\r\n \r\nThese will be shown in a new \"Queries\" section beneath \"Views\" on the database page.\r\n\r\n\"timezones\"\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": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-349383276", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 349383276, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTM4MzI3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-05T17:45:20Z", "updated_at": "2017-12-05T17:45:20Z", "author_association": "OWNER", "body": "http://datasette.readthedocs.io/en/latest/sql_queries.html", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/20#issuecomment-349406761", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/20", "id": 349406761, "node_id": "MDEyOklzc3VlQ29tbWVudDM0OTQwNjc2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2017-12-05T19:03:06Z", "updated_at": "2017-12-05T19:03:06Z", "author_association": "OWNER", "body": "Demo: https://timezones-api.now.sh/timezones-3cb9f64/by_point", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 267759136, "label": "Config file with support for defining canned queries"}, "performed_via_github_app": null}