Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

backingStore API might not be quite right #23

Closed
domenic opened this issue Mar 16, 2018 · 2 comments
Closed

backingStore API might not be quite right #23

domenic opened this issue Mar 16, 2018 · 2 comments
Labels
api A proposal for changing the API surface

Comments

@domenic
Copy link
Collaborator

domenic commented Mar 16, 2018

It occurs to me you can't really use the IndexedDB database manually, once a StorageArea has opened it. (Unless we add explicit close(); see #13.)

As such, the only way to really use backingStore is:

const backingStoreInfo = (new StorageArea("foo")).backingStore;

But this is kind of awkward, creating a StorageArea with no intention of actually using it. Instead, maybe it should just be

const backingStoreInfo = StorageArea.backingStore("foo");
@domenic domenic added the api A proposal for changing the API surface label Mar 16, 2018
@domenic
Copy link
Collaborator Author

domenic commented Mar 16, 2018

Wait, no, this is wrong, you can totally have multiple open connections to the same database at once. There's no problem here.

/cc @inexorabletash to double-check me.

@domenic domenic closed this as completed Mar 16, 2018
@inexorabletash
Copy link
Member

Confirmed. No problem here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api A proposal for changing the API surface
Projects
None yet
Development

No branches or pull requests

2 participants