Open JasonYHZ opened 1 year ago
Closing the old database and then opening the new one under a different path sounds reasonable.
This sounds similar to #2515: There appears to be a place where you're running an update asynchronously (someplace where you set isRead: true
) after you've closed the database. The only solution at the moment is to not do that, but since it has come up multiple times, perhaps we should improve the APIs here. Do you have a way to not use the old database after closing it (this may be hard to implement when some tasks are accessing the database asynchronously, or are not properly notified that there is a new database instance).
In app, I need to dynamically create corresponding sqlite files according to the user's id. When one of my users logs out, and then another user logs in, how do I switch the corresponding sqlite files of other users?
Now I have recreated an object after using the close () method
However, the following error prompt appears on the recreated object
My logic for creating the database is like this.