Skip to content

SmartContract: add FindOptions.Backwards to iterate in reverse order#2819

Merged
shargon merged 7 commits intoneo-project:masterfrom
roman-khimov:findoptions-backwards
Apr 12, 2023
Merged

SmartContract: add FindOptions.Backwards to iterate in reverse order#2819
shargon merged 7 commits intoneo-project:masterfrom
roman-khimov:findoptions-backwards

Conversation

@roman-khimov
Copy link
Contributor

Depending on the data scheme contracts may want to iterate over prefix in descending order. Fixes #2789.

Depending on the data scheme contracts may want to iterate over prefix in
descending order. Fixes neo-project#2789.
AnnaShaleva
AnnaShaleva previously approved these changes Sep 28, 2022
Syntax sweetener.

Co-authored-by: Anna Shaleva <shaleva.ann@gmail.com>
AnnaShaleva
AnnaShaleva previously approved these changes Feb 3, 2023
@mialbu mialbu mentioned this pull request Feb 9, 2023
12 tasks
@superboyiii
Copy link
Member

@erikzhang @roman-khimov Let's move on.

@Jim8y
Copy link
Contributor

Jim8y commented Mar 15, 2023

@shargon Mind to review this on?

shargon
shargon previously approved these changes Mar 21, 2023
AnnaShaleva
AnnaShaleva previously approved these changes Apr 6, 2023
@AnnaShaleva
Copy link
Member

@Liaojinghui, @superboyiii, @erikzhang, could you review this PR, please? Let's move on with it, it's pretty useful.

key2.Should().Be(items.ElementAt(2).Key);
value2.Should().Be(items.ElementAt(2).Value);
key1.Should().Be(items.ElementAt(3).Key);
value1.Should().Be(items.ElementAt(3).Value);
Copy link
Member

Choose a reason for hiding this comment

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

tests for the null cases length 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed and improved impl. a bit.

Jim8y
Jim8y previously approved these changes Apr 10, 2023
@roman-khimov roman-khimov dismissed stale reviews from Jim8y, AnnaShaleva, and shargon via 0c99b16 April 10, 2023 15:29
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.

Add a FindOption to control SeekDirection of Storage.Find

7 participants