Skip to content

feat: <breaking_change> persistence impl refactoring new#1973

Draft
murali-shris wants to merge 1 commit intotrunkfrom
secondary_persistence_impl_new
Draft

feat: <breaking_change> persistence impl refactoring new#1973
murali-shris wants to merge 1 commit intotrunkfrom
secondary_persistence_impl_new

Conversation

@murali-shris
Copy link
Copy Markdown
Contributor

@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