{"html_url": "https://github.com/simonw/sqlite-utils/issues/199#issuecomment-723147463", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/199", "id": 723147463, "node_id": "MDEyOklzc3VlQ29tbWVudDcyMzE0NzQ2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-11-06T15:41:00Z", "updated_at": "2020-11-06T15:41:00Z", "author_association": "OWNER", "body": "Something like this:\r\n```\r\n@db.register_function(replace=True)\r\ndef my_function(a):\r\n return a.upper()\r\n```\r\nIf `replace=True` then this function will be registered even if a `my_function` of arity 1 has already been registered previously.\r\n\r\nIt defaults to `False` though which means the Database object tracks what functions and arities have been registered in the past and silently ignores any new attempts to register the same name/arity.\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 737855731, "label": "@db.register_function(..., replace=False) to avoid double-registering custom functions"}, "performed_via_github_app": null}