{"html_url": "https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968450579", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/339", "id": 968450579, "node_id": "IC_kwDOCGYnMM45uWIT", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-15T02:02:34Z", "updated_at": "2021-11-15T02:02:34Z", "author_association": "OWNER", "body": "Documentation: https://github.com/simonw/sqlite-utils/blob/54a2269e91ce72b059618662ed133a85f3d42e4a/docs/python-api.rst#working-with-lookup-tables", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1053122092, "label": "`table.lookup()` option to populate additional columns when creating a record"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968435041", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/339", "id": 968435041, "node_id": "IC_kwDOCGYnMM45uSVh", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-15T01:44:42Z", "updated_at": "2021-11-15T01:44:42Z", "author_association": "OWNER", "body": "`lookup(column_values, extra_values)` is one option.\r\n\r\n`column_values` isn't actually a great name for the first parameter any more, since the second parameter also takes column values. The first parameter is now all about the unique lookup values.\r\n\r\nMaybe this:\r\n\r\n lookup(lookup_values, extra_values)", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1053122092, "label": "`table.lookup()` option to populate additional columns when creating a record"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968434594", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/339", "id": 968434594, "node_id": "IC_kwDOCGYnMM45uSOi", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-15T01:43:10Z", "updated_at": "2021-11-15T01:43:10Z", "author_association": "OWNER", "body": "What should I call this parameter? Django has a similar feature where it calls them `defaults=` (for `get_or_create()`) but I'm not a huge fan of that name.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1053122092, "label": "`table.lookup()` option to populate additional columns when creating a record"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/339#issuecomment-968434425", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/339", "id": 968434425, "node_id": "IC_kwDOCGYnMM45uSL5", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-11-15T01:42:36Z", "updated_at": "2021-11-15T01:42:36Z", "author_association": "OWNER", "body": "Here's the current signature of `table.lookup()`: https://github.com/simonw/sqlite-utils/blob/9cda5b070f885a7995f0c307bcc4f45f0812994a/sqlite_utils/db.py#L2716-L2729\r\n\r\nI'm going to add a second positional argument which can provide a dictionary of column->value to use when creating the original table and populating the initial row. If the row already exists, those columns will be ignored entirely.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1053122092, "label": "`table.lookup()` option to populate additional columns when creating a record"}, "performed_via_github_app": null}