{"html_url": "https://github.com/simonw/datasette/issues/1927#issuecomment-1339910494", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1927", "id": 1339910494, "node_id": "IC_kwDOBm6k_c5P3Wle", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-06T19:37:39Z", "updated_at": "2022-12-06T19:37:39Z", "author_association": "OWNER", "body": "I'll finish this after I land:\r\n- #1931 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1473411197, "label": "ignore:true/replace:true options for /db/-/create API"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1927#issuecomment-1336099588", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1927", "id": 1336099588, "node_id": "IC_kwDOBm6k_c5Po0ME", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-03T06:58:14Z", "updated_at": "2022-12-03T06:58:14Z", "author_association": "OWNER", "body": "I have not yet documented the new `insert` and `replace` options.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1473411197, "label": "ignore:true/replace:true options for /db/-/create API"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1927#issuecomment-1336099533", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1927", "id": 1336099533, "node_id": "IC_kwDOBm6k_c5Po0LN", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-03T06:57:52Z", "updated_at": "2022-12-03T06:57:52Z", "author_association": "OWNER", "body": "I'm going to push what I have anyway. I'll keep this issue open while I think through the above comment.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1473411197, "label": "ignore:true/replace:true options for /db/-/create API"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1927#issuecomment-1336099368", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1927", "id": 1336099368, "node_id": "IC_kwDOBm6k_c5Po0Io", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-03T06:56:36Z", "updated_at": "2022-12-03T06:56:36Z", "author_association": "OWNER", "body": "Neither of these options make sense if you didn't pass a `\"pk\"`.\r\n\r\nMy initial implementation spotted if the `pk` was missing and looked it up from the table, but actually I don't think that makes sense - if you know the table exists and hence don't pass the `pk` you should be using `/-/insert` or `/-/upsert` instead.\r\n\r\nSo maybe this work should expanded to include validation that checks if the table exists already - and if it does, confirms that the primary key (and maybe even the columns) are the same as for that existing table.\r\n\r\nOf course if you only send `row` or `rows` then checking `columns` doesn't completely make sense - but we could check that the rows you have sent are equal to or a subset of the columns in the table. We could even check the column types as well, as seen in:\r\n- #1910 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1473411197, "label": "ignore:true/replace:true options for /db/-/create API"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1927#issuecomment-1335984268", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1927", "id": 1335984268, "node_id": "IC_kwDOBm6k_c5PoYCM", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-03T00:26:26Z", "updated_at": "2022-12-03T00:26:26Z", "author_association": "OWNER", "body": "Also: the documentation should clarify that you can call this API multiple times when using the `rows` option.\r\n\r\n(It will probably grow `\"alter\": true` soon too).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1473411197, "label": "ignore:true/replace:true options for /db/-/create API"}, "performed_via_github_app": null}