forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix(indexeddb): fix IDB cursor.continue_() call after drop #2028
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
dd00b9b
impl first method for CursorDriver
borngraced 7ae981b
fix clippy checks/warnings
borngraced e48fa44
minor enhancement
borngraced f51c832
another minor enhancement
borngraced 4b364de
update get_last_block_header_with_non_max_bits next usage
borngraced 959f00b
improve impl and add DbCursorEvent::FirstItem
borngraced 8388498
impl test_get_first_last_cursor_result unit test
borngraced fee4402
fix typo
borngraced 3410e4f
save dev state — impl limit and stop method
borngraced 7448af6
Merge remote-tracking branch 'origin/dev' into impl_first_method_for_…
borngraced 4837eee
impl stop method to update CursorDriver stopped state
borngraced 2b48488
fix clippy warning
borngraced f8f1940
impl where condition
borngraced ce29c1e
unit tests and where_first() impl
borngraced 4348c83
fix typo
borngraced 4ec8fae
fix utxo_block_header_storage wasm review notes
borngraced 9390742
check if item should be skipped before returning based on where condi…
borngraced f21d526
use next_value without ref
borngraced 181e847
enhance item_action checks in CursorDriver::process_cursor_item
borngraced File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would happen if there are more than one object/record that satisfies the condition? I see that we return the first object, are we sure we won't get
Uncaught Error: closure invoked recursively or after being dropped
. This is part of the reason I wantedwhere
andlimit
, so we can get more than one object that satisfies the condition, if we want this in other cases (other than the case here where we want only the first object).P.S. If we don't get the error when there are more than one object that satisfies the condition, then the inclusion of limit and refactoring of where to return more than one object if they exist can be done in a different PR since this PR purpose is to fix the error only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm this seems like another enhancement that's not related to this PR.
This PR only handle case for retrieving the first item that meets a condition(if specified) which solves js exception error:
Uncaught Error: closure invoked recursively or after being
But for sure this PR indeed fixed that and also optimizes calls toindexeddb
.I will work on the later issue during next print.