Options for Using `@effect/sql` with Per-User SQLite Databases
In a recent project, I have the situation in which each user has their own SQLite database. I would love to use
@effect/sql for this project as well. I looked into the SQLite-specific implementation of @effect/sql already and figured that the database will be opened upon layer creation. Now, I see two options: either a) isolating the managed runtime on a request basis (expensive) or b) not using @effect/sql for this case and having my own service that exposes a getDatabase(userId) function, which then opens the SQLite. Do I have other options that I'm overlooking right now?