Skip to content

SQL database driver dispose doesn't close the connection #680

@mutewinter

Description

@mutewinter

Environment

Any

Reproduction

  1. Create a storage using db0 and SQLite
  2. Call .dispose
  3. The db0 connect remains open

Describe the bug

There is no dispose method for the SQL driver, which means that the connection remains open even after calling .dispose on the storage.

The connection stays open, which means that for example on Windows you can't delete the database file.

Workaround

I'm currently working around this by keeping a weak map of database objects mapped to storages and then doing this manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions