{"html_url": "https://github.com/simonw/sqlite-utils/issues/343#issuecomment-1055854884", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/343", "id": 1055854884, "node_id": "IC_kwDOCGYnMM4-7xEk", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-01T21:03:45Z", "updated_at": "2022-03-01T21:03:45Z", "author_association": "OWNER", "body": "Just found myself needing this capability myself!\r\n\r\nRelevant code:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/8f386a0d300d1b1c76132bb75972b755049fb742/sqlite_utils/db.py#L2297-L2307\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/8f386a0d300d1b1c76132bb75972b755049fb742/sqlite_utils/db.py#L2996-L3001\r\n\r\nSo various functions could grow a `hash_id_columns=(\"title\", \"date\")` argument which causes just those columns to be included in the hash.\r\n\r\nBonus: if you use `hash_id_columns=...` without setting `hash_id=\"id\"` it could assume that you want the column to be called `id`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1063388037, "label": "Provide function to generate hash_id from specified columns"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/343#issuecomment-1055855845", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/343", "id": 1055855845, "node_id": "IC_kwDOCGYnMM4-7xTl", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-01T21:04:45Z", "updated_at": "2022-03-01T22:43:38Z", "author_association": "OWNER", "body": "I'm going to make that `_hash()` utility function a documented, non-underscore-prefixed function too - called `hash_record()`.", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 1, \"eyes\": 0}", "issue": {"value": 1063388037, "label": "Provide function to generate hash_id from specified columns"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/410#issuecomment-1055856441", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/410", "id": 1055856441, "node_id": "IC_kwDOCGYnMM4-7xc5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-01T21:05:21Z", "updated_at": "2022-03-01T21:05:21Z", "author_association": "OWNER", "body": "Thanks!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1149729902, "label": "Correct spelling mistakes (found with codespell)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/409#issuecomment-1055930639", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/409", "id": 1055930639, "node_id": "IC_kwDOCGYnMM4-8DkP", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-01T22:40:15Z", "updated_at": "2022-03-01T22:40:15Z", "author_association": "OWNER", "body": "This test fails and I don't understand why:\r\n```python\r\nfrom sqlite_utils import Database\r\n\r\n\r\ndef test_transaction():\r\n db1 = Database(memory_name=\"transaction_test\", tracer=print)\r\n db2 = Database(memory_name=\"transaction_test\", tracer=print)\r\n with db1.conn:\r\n db1[\"t\"].insert({\"foo\": 1})\r\n assert list(db2[\"t\"].rows) == []\r\n assert list(db2[\"t\"].rows) == [{\"foo\": 1}]\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1149661489, "label": "`with db:` for transactions"}, "performed_via_github_app": null}