{"html_url": "https://github.com/simonw/datasette/pull/2077#issuecomment-1557289070", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2077", "id": 1557289070, "node_id": "IC_kwDOBm6k_c5c0lhu", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2023-05-22T14:08:33Z", "updated_at": "2023-06-29T14:40:35Z", "author_association": "NONE", "body": "## [Codecov](https://app.codecov.io/gh/simonw/datasette/pull/2077?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nPatch and project coverage have no change.\n> Comparison is base [(`ede6203`)](https://app.codecov.io/gh/simonw/datasette/commit/ede62036180993dbd9d4e5d280fc21c183cda1c3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 92.40% compared to head [(`9785c4f`)](https://app.codecov.io/gh/simonw/datasette/pull/2077?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 92.40%.\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #2077 +/- ##\n=======================================\n Coverage 92.40% 92.40% \n=======================================\n Files 39 39 \n Lines 5803 5803 \n=======================================\n Hits 5362 5362 \n Misses 441 441 \n```\n\n\n\n\n
\n\n[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/simonw/datasette/pull/2077?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). \n:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1719759468, "label": "Bump furo from 2023.3.27 to 2023.5.20"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/554#issuecomment-1557607516", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/554", "id": 1557607516, "node_id": "IC_kwDOCGYnMM5c1zRc", "user": {"value": 1231935, "label": "xavdid"}, "created_at": "2023-05-22T17:18:33Z", "updated_at": "2023-05-22T17:18:33Z", "author_association": "NONE", "body": "Oh and for context - this goes away if I use `.upsert` instead of `insert(..., ignore=True)`, but I don't want to update the value if it's written, just do an insert if it's new. The code is basically:\r\n\r\n```py\r\ndef save_items(table, items):\r\n db[\"users\"].insert(build_user(items[0]), pk=\"id\",ignore=True)\r\n db[table].insert_all(items)\r\n\r\nif comments := fetch_comments():\r\n save_items('comments', comments)\r\n\r\nif posts := fetch_posts():\r\n save_items('posts', posts)\r\n```\r\n\r\nSo either `comments` or `post` could create the relevant user if those items exist. In cases where they _both_ exist, I get this error. I need the `pk` because either call could create the table.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1720096994, "label": "`IndexError` when doing `.insert(..., pk='id')` after `insert_all`"}, "performed_via_github_app": null}