{"html_url": "https://github.com/simonw/datasette/issues/2145#issuecomment-1684384750", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2145", "id": 1684384750, "node_id": "IC_kwDOBm6k_c5kZavu", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-18T20:07:18Z", "updated_at": "2023-08-18T20:07:18Z", "author_association": "OWNER", "body": "The big challenge here is what the URL to that row page should look like. How can I encode a `None` in a form that can be encoded and decoded without clashing with primary keys that are the string `None` or `null`?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1857234285, "label": "If a row has a primary key of `null` various things break"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/2145#issuecomment-1684494464", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/2145", "id": 1684494464, "node_id": "IC_kwDOBm6k_c5kZ1iA", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-08-18T22:27:51Z", "updated_at": "2023-08-18T22:28:40Z", "author_association": "OWNER", "body": "Oh wow, null primary keys are bad news... SQLite lets you insert multiple rows with the same `null` value!\r\n```pycon\r\n>>> import sqlite_utils\r\n>>> db = sqlite_utils.Database(memory=True)\r\n>>> db[\"foo\"].insert({\"id\": None, \"name\": \"No ID\"}, pk=\"id\")\r\n