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: <breaking_change> persistence impl refactoring new #1973

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

murali-shris
Copy link
Member

@murali-shris murali-shris commented May 31, 2024

- What I did

  • uptake persistence spec changes for put/create methods and refactoring related to the changes

- How I did it

  • in hive_keystore.dart, modified impl of put/create methods. version and createdAt/updatedAt metadata is set just before putting/creating the key. Remove putAll method.
  • AtMetadataBuilder was having inconsistent logic for setting metadata fields. Removed the code from persistence secondary
  • in hive_keystore.dart, removed AtMetadataBuilder. metadata passed to the method will be used without modification(except version and updatedAt)
  • in hive_keystore_helper.dart -> prepareDataForKeystoreOperation, removed AtMetadataBuilder. this will be the order of priority for setting newMetaData
    1. passed in metadata
    2. metadata from passed value
    3. existing metadata
  • in hive_keystore_helper.dart -> prepareDataForKeystoreOperation, derived values from ttl, ttb and ttr are computed
  • at_metadata_.dart. removed AtMetadataBuilder.
    Changes to tests:
  • in at_metadata_test.dart, removed updatedAt check from default field for new key. For new key only createdAt is needed. updatedAt will be set only on subsequent update to value/metadata for that key. Removed test for putAll

- How to verify it

  • unit, functional and end2endtests should pass

@murali-shris murali-shris changed the title feat: persistence impl refactoring feat: persistence impl refactoring new May 31, 2024
@murali-shris murali-shris changed the title feat: persistence impl refactoring new feat: <breaking_change> persistence impl refactoring new May 31, 2024
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.

1 participant