Skip to content

is a closed database safe for file copy? #1462

Answered by simolus3
mattsimgithub asked this question in Q&A
Discussion options

You must be logged in to vote

From what else I've seen, I infer this is OK as long as db.close() is properly awaited. But I'd like to doublecheck.

Yes, this should be fine. Be aware that other operations using the database will throw an exception once the database has been closed, so you might need some in-app synchronization to avoid that.

Also, is it possible to re-open the database easily once it's closed

Not really unfortunately, you'd have to create a new instance of the database class and use that then.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattsimgithub
Comment options

Answer selected by mattsimgithub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants