Skip to content

Obtain all active connections in the pool #62

Open
@js2702

Description

@js2702

We are currently in the process of testing PowerSync to migrate one of our apps. It makes heavy use of ATTACH/DETACH during runtime and we've been previously using just a single connection on a background isolate with Drift. So now with sqlite_async we have at least two connections. Making it harder to run the ATTACH when needed.

We were wondering how feasible it would be to add a way to obtain a list of connections so that we can run the ATTACH query on all instances.

One solution would be running the attach before using the attached db in a query, but on our app that would be unfeasible because the attach acts like a global state and all the app logic relies on that attachment existing.

Also, one of our attached databases is pretty large so ideally we would prefer to open the read connections only once and don't tear them down. Is that how it currently works, or are the read connections spawned/teared down dynamically?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions