Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fuchsia opened this issue Mar 17, 2025 · 2 comments · Fixed by #57522
Closed

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

fuchsia opened this issue Mar 17, 2025 · 2 comments · Fixed by #57522
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@fuchsia
Copy link

fuchsia commented Mar 17, 2025

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.

@fuchsia fuchsia added the feature request Issues that request new features to be added to Node.js. label Mar 17, 2025
@github-project-automation github-project-automation bot moved this to Awaiting Triage in Node.js feature requests Mar 17, 2025
cjihrig added a commit to cjihrig/node that referenced this issue Mar 17, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: nodejs#57521
@cjihrig
Copy link
Contributor

cjihrig commented Mar 17, 2025

Addressed in #57522.

@fuchsia
Copy link
Author

fuchsia commented Mar 17, 2025

Brilliant! I look forward it landing.

nodejs-github-bot pushed a commit that referenced this issue Mar 19, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
aduh95 pushed a commit that referenced this issue Mar 23, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 1, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 1, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit to RafaelGSS/node that referenced this issue Apr 8, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: nodejs#57521
PR-URL: nodejs#57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 14, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 14, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
aduh95 pushed a commit that referenced this issue Apr 14, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
aduh95 pushed a commit that referenced this issue Apr 14, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
aduh95 pushed a commit that referenced this issue Apr 15, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 16, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue Apr 17, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue May 1, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
RafaelGSS pushed a commit that referenced this issue May 2, 2025
This commit adds a getter to indicate whether or not the database
is currently open.

Fixes: #57521
PR-URL: #57522
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants