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

Storage trait API changes #268

Merged
merged 28 commits into from
Feb 10, 2023
Merged

Storage trait API changes #268

merged 28 commits into from
Feb 10, 2023

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Jan 9, 2023

Implement changes from p2panda/p2panda#469, refactoring (especially in DocumentStore) and a chance for better docs!

  • make changes required by Storage trait API changes p2panda#469
    • update store APIs
    • remove deprecated StorageEntry and EntryWithOperation
    • meaningful changes to the methods on DocumentStore which now returns Documents from all getter methods
  • big refactor of document and document view insertion methods (these methods are not defined on DocumentStore trait anymore)
  • add document_id column to document_views table
  • update tests
  • update effected modules
  • update and a chance to improve docs for these stores
    • entry
    • log
    • operation
    • document

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@sandreae sandreae changed the title Storage trait changes from [p2panda_rs/#469](https://github.com/p2panda/p2panda/pull/469) Storage trait changes from p2panda_rs/#469 Jan 9, 2023
@sandreae sandreae changed the title Storage trait changes from p2panda_rs/#469 Storage trait changes Jan 9, 2023
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Base: 94.61% // Head: 94.17% // Decreases project coverage by -0.45% ⚠️

Coverage data is based on head (f242db9) compared to base (926e939).
Patch coverage: 89.10% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
- Coverage   94.61%   94.17%   -0.45%     
==========================================
  Files          59       61       +2     
  Lines        5108     5147      +39     
==========================================
+ Hits         4833     4847      +14     
- Misses        275      300      +25     
Impacted Files Coverage Δ
aquadoggo/src/context.rs 100.00% <ø> (ø)
aquadoggo/src/graphql/client/utils.rs 93.75% <ø> (ø)
aquadoggo/src/graphql/replication/client.rs 85.71% <ø> (ø)
aquadoggo/src/db/stores/task.rs 91.52% <42.85%> (ø)
aquadoggo/src/db/types/document.rs 47.05% <47.05%> (ø)
aquadoggo/src/db/stores/operation.rs 85.33% <72.00%> (-8.05%) ⬇️
aquadoggo/src/db/stores/test_utils/helpers.rs 98.71% <80.00%> (-1.29%) ⬇️
aquadoggo/src/db/types/operation.rs 86.66% <86.66%> (ø)
aquadoggo/src/graphql/client/dynamic_query.rs 95.50% <86.95%> (+1.94%) ⬆️
aquadoggo/src/db/stores/document.rs 91.78% <89.78%> (-1.46%) ⬇️
... and 24 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@adzialocha adzialocha self-requested a review January 23, 2023 11:54
Copy link
Member

@adzialocha adzialocha left a comment

Choose a reason for hiding this comment

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

Cool! After reading the API changes this was really easy to follow. I'm happy we're removing some fluff. Thank you!!

I haven't looked very closely at the tests but I trust that they are all still doing their job 😆

As always, only some formatting things and minor requests. With CHANGELOG.md entry this is ready to go.

aquadoggo/Cargo.toml Outdated Show resolved Hide resolved
aquadoggo/Cargo.toml Outdated Show resolved Hide resolved
aquadoggo/src/context.rs Show resolved Hide resolved
aquadoggo/src/db/sql_store.rs Outdated Show resolved Hide resolved
aquadoggo/src/db/stores/document.rs Outdated Show resolved Hide resolved
aquadoggo/src/db/stores/document.rs Show resolved Hide resolved
aquadoggo/src/db/stores/document.rs Show resolved Hide resolved
aquadoggo/src/db/stores/document.rs Show resolved Hide resolved
aquadoggo/src/db/stores/operation.rs Show resolved Hide resolved
aquadoggo/src/db/types/document.rs Show resolved Hide resolved
@sandreae sandreae marked this pull request as ready for review February 10, 2023 18:12
@sandreae sandreae merged commit 7f8a216 into main Feb 10, 2023
@adzialocha adzialocha deleted the storage-trait-changes branch February 11, 2023 01:35
@sandreae sandreae changed the title Storage trait changes Storage trait API changes Feb 20, 2023
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.

None yet

2 participants