-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Save and load from local storage #94
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Keeping ownership of everyThing within AppMeta, DataStore::save() now only takes a reference to Thing. The calling code is expected to remain the source of truth while the app is running.
Really, all we need is the ability to load all data from storage. We'll do our searching against local data.
Rough in structure of web data store. Currently it just logs the data to store to the console.
Update parameter to be clear about what we're searching for.
Command moves an entity from memory to local storage.
The name will never not be funny. In the spirit of name(), added a method that reliably gets or sets the inner UUID for a Thing, regardless of the inner type.
There was too much embedded logic in the command struct. Fortunately, there's a name for that logic: the repository pattern!
In order to make the database queries asynchronous, we need run() to be async, as well as the underling repository/data store save methods.
Mash up web and www. Maybe a mistake? Maybe not? Anyway, it seems to make the build process happier.
Module will be used to interface with IndexedDB.
This is it, folks. We can now dump data into the black hole that is the data store. Currently no way to read it back, however. Removing the WASM tests for now. They're not providing a whole lot of value, and would probably be better handled with something Selenium-based that can cover the JS side of things as well.
In addition to serializing Things and adding them to the IndexedDB, they are now saved to cache.
Load entire local storage into cache when the page initializes. This _should_ complete the save/load workflow.
MikkelPaulson
force-pushed
the
impl-local-storage
branch
from
August 9, 2021 18:10
07a1bf2
to
99bf43f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements saving and loading data via IndexedDB local storage.
Resolves #93.