Skip to content
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

Question: Why does the database owner need to open the database with the databaseName #257

Open
Fubinator opened this issue Jan 12, 2021 · 1 comment

Comments

@Fubinator
Copy link
Contributor

I have been wondering for some time why a database owner has to open their own databases with the name of the database. When opening a database, you must always check whether the user is the owner of the database or not. I understand why users who are not owners of a database cannot open it by name, but why can't an owner open the database using the ID? From a developer experience point of view, for me personally it would simplify a lot to always be able to open a database with the ID regardless of whether the user is the owner of the database or not.

@j-berman
Copy link
Collaborator

Valid question.

This was a precautionary measure that the internals of the SDK rely on to be extremely confident a user's database can't be corrupted when a developer calls openDatabase on an already open database, or when a user's connection to a database drops and reconnects.

It's possible to do and we'd like to do it - it will require a non-negligible amount of structural changes to the SDK to be sure it's safe in the above circumstances.

Will keep open until implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants