We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As part of the revamp of collection types, I'll list the issues with the current version and how this new type will solve the issue.
Problems with near_sdk::collections::UnorderedMap:
near_sdk::collections::UnorderedMap
Vector
Bucket
UnorderedMap
LookupMap
Vector,
So the data structure will look something like this (visualized in JSONish):
Bucket: ["key0", "key2", "key1"] LookupMap: { "<key0hash>": (<key0value>, 0), "<key1hash>": (<key1value>, 2), "<key2hash>": (<key2value>, 1), }
The text was updated successfully, but these errors were encountered:
austinabell
Successfully merging a pull request may close this issue.
As part of the revamp of collection types, I'll list the issues with the current version and how this new type will solve the issue.
Problems with
near_sdk::collections::UnorderedMap
:Vector
types for the keys and values, which exaggerates the previous problem, but also requires multiple individual reads and writesBucket
type, which is basically just aVector
to keep track of keys and leverage the feat: caching LookupMap implementation #487 implUnorderedMap
will allow other APIs such as iteratorsVector
/Bucket
(PR soon) andLookupMap
)Vector,
hard to maintain and open to bugsLookupMap
, and the value will contain the index for the bucket.So the data structure will look something like this (visualized in JSONish):
The text was updated successfully, but these errors were encountered: