Skip to content

node:sqlite: need someway to tell if the database is still open #57521

Closed
@fuchsia

Description

@fuchsia

What is the problem this feature will solve?

As far as I can see, there is no way to tell if the database has been closed: all you can do is try something and see if it throws. (better-sqlite3 has an open property on the database itself.)

What is the feature you are proposing to solve the problem?

I'm not! Solve it however you think best. ;) But an isOpen() function on the database seems obvious, given open is taken.

What alternatives have you considered?

Switching back to better-sqlite3... ;) Otherwise, it's trap the exception.

It's not a huge issue. But would have been handy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions