A way to attach multiple databases?
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
I can't figure out how to attach multiple databases to run queries across two sqlite files. Something like this:
ATTACH 'db1.sqlite3' AS db1;
ATTACH 'db2.sqlite3' AS db2;
SELECT * FROM db1.users NATURAL JOIN db2.meta
Works in sqlite at command line. Not sure how to achieve same effect here. Possible?
-Rob
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue; first inspect sql.js's database and query entry points and how SQLite files are loaded. Confirm whether multiple ATTACH statements can be supported, with completion demonstrated by querying across the two SQLite files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sqlite
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100