{"html_url": "https://github.com/simonw/sqlite-utils/issues/284#issuecomment-864419283", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/284", "id": 864419283, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NDQxOTI4Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-19T15:15:34Z", "updated_at": "2021-06-19T15:15:34Z", "author_association": "OWNER", "body": "I think this code is at fault: https://github.com/simonw/sqlite-utils/blob/5b257949d996fe43dc5d218d4308b88796a90740/sqlite_utils/db.py#L1017-L1023\r\n\r\nIt's using `.pks` which adds `rowid` if it's missing.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 925320167, "label": ".transform(types=) turns rowid into a concrete column"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/284#issuecomment-864416911", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/284", "id": 864416911, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NDQxNjkxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-19T14:55:45Z", "updated_at": "2021-06-19T14:55:45Z", "author_association": "OWNER", "body": "https://github.com/simonw/sqlite-utils/blob/dc94f4bb8cfe922bb2f9c89f8f0f29092ea63133/sqlite_utils/db.py#L805-L810\r\n\r\nSo I can indeed detect a `rowid` table by looking for no `is_pk` columns.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 925320167, "label": ".transform(types=) turns rowid into a concrete column"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/284#issuecomment-864416785", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/284", "id": 864416785, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NDQxNjc4NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-19T14:54:41Z", "updated_at": "2021-06-19T14:54:41Z", "author_association": "OWNER", "body": "```pycon\r\n>>> db = sqlite_utils.Database(memory=True)\r\n>>> db[\"rowid_table\"].insert({\"name\": \"Cleo\"})\r\n\r\n>>> db[\"regular_table\"].insert({\"id\": 1, \"name\": \"Cleo\"}, pk=\"id\")\r\n
\r\n>>> db[\"rowid_table\"].pks\r\n['rowid']\r\n>>> db[\"regular_table\"].pks\r\n['id']\r\n```\r\nI think I need an introspection property for working out if a table is a `rowid` table or not.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 925320167, "label": ".transform(types=) turns rowid into a concrete column"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/284#issuecomment-864358951", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/284", "id": 864358951, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NDM1ODk1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-19T05:30:00Z", "updated_at": "2021-06-19T05:30:00Z", "author_association": "OWNER", "body": "If this can be fixed it will be in the `transform_sql()` method.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 925320167, "label": ".transform(types=) turns rowid into a concrete column"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/284#issuecomment-864358680", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/284", "id": 864358680, "node_id": "MDEyOklzc3VlQ29tbWVudDg2NDM1ODY4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-19T05:27:13Z", "updated_at": "2021-06-19T05:27:13Z", "author_association": "OWNER", "body": "How easy is it to detect a `rowid` table? Is it as simple as `.pks` returning `None`? If so the documentation should mention that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 925320167, "label": ".transform(types=) turns rowid into a concrete column"}, "performed_via_github_app": null}