-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Introduced useInMemoryDatabases configuration option #294
Conversation
This is a good beginning, thank you. I'm not personally really concerned about the issue with non-Node environments, as it is not overloading a legitimate database name, but relying on config (and even if the user were deploying polyglot browser/Node code, they could detect the environment to turn on or off the config). A few concerns I think we'd need to have resolved/addressed first, however:
For any given non-shared in-memory WebSQL database, one can call
Besides the above, I'd ideally like for the same PR to also handle the following related and thankfully pretty easy, situations:
|
Ok, in
In order to add this support, we look for the value of The user can thus still supply a name (which gets made available to And if one is lazy, one can set I expect the latter two features will work but I have not yet added unit tests for them. If you wanted to play around with them and add any such tests (and if necessary any PRs to fix), that would be most appreciated as I would like to focus on getting our remaining failing W3C-tests up to speed as well as debug in the browsers (esp. Safari). FWIW, I have also added the following somewhat related features:
|
Thanks for handling this and sorry about the lack of feedback. I'm still trying to wrap my head around how those things are related to each other and how to use them effectively so I doubt that I'd be of much help anytime soon, unfortunately. |
They're not really related to each other outside of the fact that they relate to Node and db config. The main concern I have is with Just see if it works ok when set to ":memory:" (passing whatever name you want to Also if you could check If not, I guess I'll just keep it listed as untested for now. |
I'll try testing it today or tomorrow, too. |
This PR introduces a configuration option that stores all databases in memory. While it is already possible to use
escapeDatabaseName
to make it work for individual databases, sysdb will still be file-based. Our main use case for it is for running tests to avoid having to do unnecessary file cleanup afterwards.I also noticed that #278 mentions that you intend to make it easier for Node users to use in-memory databases which this change might help with.
If it's a concern to you that this option would be exposed to non-Node environments, I could clarify this in the comments/README or implement it differently. For instance, extending
escapeDatabaseName()
to also apply to sysdb or adding a separate configuration option to escape the file name of sysdb.