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

feat: Add IndexedDB Storage Controller #1297

Merged
merged 5 commits into from
Feb 17, 2021
Merged

feat: Add IndexedDB Storage Controller #1297

merged 5 commits into from
Feb 17, 2021

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Feb 13, 2021

Closes: #1270

Parse.CoreManager.setStorageController(Parse.IndexedDB);

The goal of this PR is to provide a default indexedDB implementation. Users are more than welcome to create their own storage controllers if they need transactions, indexes or schema migration etc...

Uses the lightweight, idb-keyval package instead of the full idb

@FunMiles Can you give it a try?

@codecov
Copy link

codecov bot commented Feb 13, 2021

Codecov Report

Merging #1297 (c7f1e82) into master (4caede2) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1297   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           59        60    +1     
  Lines         5800      5815   +15     
  Branches      1305      1305           
=========================================
+ Hits          5800      5815   +15     
Impacted Files Coverage Δ
src/IndexedDBStorageController.js 100.00% <100.00%> (ø)
src/Parse.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4caede2...3494fde. Read the comment docs.

@davimacedo
Copy link
Member

@dplewis do you believe there is a way to run the tests in ci for the scenario of using this controller (and not the default one)?

@dplewis
Copy link
Member Author

dplewis commented Feb 17, 2021

@davimacedo I can't think of anything off top of my head. Might have to look into jasmine or jest.

Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add the additional test scenario later

@dplewis dplewis merged commit 10002de into master Feb 17, 2021
@dplewis dplewis deleted the indexdb branch February 17, 2021 17:08
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

Successfully merging this pull request may close these issues.

Support web workers with alternative to localStorage (IndexedDB ?)
2 participants