{"html_url": "https://github.com/simonw/sqlite-utils/issues/113#issuecomment-781825187", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/113", "id": 781825187, "node_id": "MDEyOklzc3VlQ29tbWVudDc4MTgyNTE4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-02-19T05:09:12Z", "updated_at": "2021-02-19T05:09:12Z", "author_association": "OWNER", "body": "Documentation: https://sqlite-utils.datasette.io/en/latest/python-api.html#attaching-additional-databases", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 621286870, "label": "Syntactic sugar for ATTACH DATABASE"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/113#issuecomment-631084748", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/113", "id": 631084748, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMTA4NDc0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-19T21:11:22Z", "updated_at": "2020-05-19T21:11:22Z", "author_association": "OWNER", "body": "Here's how `twitter-to-sqlite` does it: https://github.com/dogsheep/twitter-to-sqlite/blob/6be0ffcee24504fa2964b0e526842b8cfce7567b/twitter_to_sqlite/utils.py#L506-L511\r\n\r\n```python\r\n attach_sql = \"\"\"\r\n ATTACH DATABASE '{}' AS [{}];\r\n \"\"\".format(\r\n str(pathlib.Path(filepath).resolve()), alias\r\n )\r\n db.conn.execute(attach_sql)\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 621286870, "label": "Syntactic sugar for ATTACH DATABASE"}, "performed_via_github_app": null}