-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Ability to set database name #149
Comments
@mifozski I agree. The problem is that LocalStorage used where OPFS is unavailable, does not support multiple databases.
https://sqlite.org/wasm/doc/trunk/persistence.md The affected browser is Safari. A bug blocking OPFS is already fixed, but it will take time to be available for all. If you have an idea how to solve it, feel free to help 🙂 |
@steida My idea was to just focus on the support for the OPFS storage, and I think we can decide that it's not going to be supported with localStorage, and Safari has its own limitation that are unrelated to this change. |
OPFS for Safari is already implemented in Evolu, so I suppose we can wait a few months for Safari 17 to be adopted, and then drop LocalStorage entirely. Then we can add support for more databases. |
Related #309 |
hey i actually implemented this |
Nice!, do you have a snippet of how you did that? Looking at #309 I think we'll have an official implementation soon ™️ 🎉 |
So how should the Evolu "multitenancy" work? What are the use cases? 🤔 The first use case is dev on localhost, where each app would be isolated from others. That would be nice. The second use case is the ability to have more Evolu instances run concurrently and even dynamically 🤔 |
i will provide an MR next week |
ohh awesome!! |
@negue It doesn't mean that more Evolu instances can be used concurrently. It will be possible, but not yet. |
I for one only needed a different database name so far - I wont have two apps / evolu instances in the same browser tab :) The other multiple instances feature I'll probably use as well but not a missing feature for me (yet) |
Evolu should expose the ability to define a database filename that will be created on OPFS so the users can have multiple databases on the same origin (for example, for multi-account usage).
The database filename should be passed as a param to the
createHooks
method in theConfig
object.The text was updated successfully, but these errors were encountered: