{"html_url": "https://github.com/simonw/sqlite-utils/issues/574#issuecomment-1646688748", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/574", "id": 1646688748, "node_id": "IC_kwDOCGYnMM5iJnns", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T23:12:03Z", "updated_at": "2023-07-22T23:13:14Z", "author_association": "OWNER", "body": "Just tried this out by adding the example from the docs to my `sqlite-utils-hello-world` plugin and running:\r\n```bash\r\nsqlite-utils install -e ../sqlite-utils-hello-world \r\n```\r\n```\r\nObtaining file:///Users/simon/Dropbox/Development/sqlite-utils-hello-world\r\n...\r\n```\r\nThen:\r\n```bash\r\nsqlite-utils memory \"select hello('simon')\"\r\n```\r\n```json\r\n[{\"hello('simon')\": \"Hello, simon!\"}]\r\n```\r\nAlso:\r\n```pycon\r\n>>> import sqlite_utils\r\n>>> db = sqlite_utils.Database(memory=True)\r\n>>> list(db.query(\"select hello('simon')\"))\r\n[{\"hello('simon')\": 'Hello, simon!'}]\r\n>>> db2 = sqlite_utils.Database(memory=True, execute_plugins=False)\r\n>>> list(db2.query(\"select hello('simon')\"))\r\nTraceback (most recent call last):\r\n File \"\", line 1, in \r\n File \"/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py\", line 494, in query\r\n cursor = self.execute(sql, params or tuple())\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/Users/simon/Dropbox/Development/sqlite-utils/sqlite_utils/db.py\", line 512, in execute\r\n return self.conn.execute(sql, parameters)\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\nsqlean.dbapi2.OperationalError: no such function: hello\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816918185, "label": "`prepare_connection()` plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/574#issuecomment-1646688339", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/574", "id": 1646688339, "node_id": "IC_kwDOCGYnMM5iJnhT", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T23:08:49Z", "updated_at": "2023-07-22T23:08:49Z", "author_association": "OWNER", "body": "Documentation: https://sqlite-utils.datasette.io/en/latest/plugins.html#prepare-connection-conn", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816918185, "label": "`prepare_connection()` plugin hook"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/574#issuecomment-1646686477", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/574", "id": 1646686477, "node_id": "IC_kwDOCGYnMM5iJnEN", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-07-22T22:52:56Z", "updated_at": "2023-07-22T22:52:56Z", "author_association": "OWNER", "body": "Alex built this in:\r\n- #573", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1816918185, "label": "`prepare_connection()` plugin hook"}, "performed_via_github_app": null}