{"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599696286", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599696286, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTY5NjI4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:32:59Z", "updated_at": "2020-03-16T18:33:33Z", "author_association": "OWNER", "body": "```json\r\n{\r\n \"databases\": {\r\n \"my-database\": {\r\n \"queries\": {\r\n \"add_twitter_handle\": {\r\n \"sql\": \"insert into twitter_handles (username) values (:username)\",\r\n \"write\": true\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": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599697164", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599697164, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTY5NzE2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:35:04Z", "updated_at": "2020-03-16T18:35:27Z", "author_association": "OWNER", "body": "By default this will extract the `:params` using the existing regular expression - which can occasionally break if there is a rogue `:` in the rest of the query.\r\n\r\nTo address this: allow an extra optional `\"params\": [\"username\"]` field in metadata which, if available, is used instead of the regular expression extraction.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599701145", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599701145, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTcwMTE0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:44:19Z", "updated_at": "2020-03-16T18:44:40Z", "author_association": "OWNER", "body": "This is going to need CSRF protection - see https://github.com/simonw/asgi-csrf", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599703452", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599703452, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTcwMzQ1Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:49:31Z", "updated_at": "2020-03-16T18:49:31Z", "author_association": "OWNER", "body": "Also relevant: this will benefit from an authentication/permissions layer: #699", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599704264", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599704264, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTcwNDI2NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:51:27Z", "updated_at": "2020-03-17T02:44:44Z", "author_association": "OWNER", "body": "This is also going to need me to handle POST form submissions which means I need to be able to parse the form body. I guess that will go in [datasette/utils/asgi.py](https://github.com/simonw/datasette/blob/master/datasette/utils/asgi.py).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599704655", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599704655, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTcwNDY1NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:52:23Z", "updated_at": "2020-03-16T18:52:23Z", "author_association": "OWNER", "body": "I have code for form parsing in `asgi-csrf`: https://github.com/simonw/asgi-csrf/blob/3fc164a9258ebfa616d4e724fcb102b117277c6e/asgi_csrf.py#L91-L109", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 582517965, "label": "Ability for a canned query to write to the database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/698#issuecomment-599706260", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/698", "id": 599706260, "node_id": "MDEyOklzc3VlQ29tbWVudDU5OTcwNjI2MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-03-16T18:56:00Z", "updated_at": "2020-03-16T18:56:00Z", "author_association": "OWNER", "body": "It would be useful if this feature supported different types of input - at the most basic level `` v.s. `