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

Split points classes #9

Merged
merged 8 commits into from
Apr 16, 2024
Merged

Split points classes #9

merged 8 commits into from
Apr 16, 2024

Conversation

PaulLeCam
Copy link
Contributor

As discussed, this removes the single point model and instead make both the aggregation and allocation models use a shared interface.

The library now exports 3 reader classes:

  • GenericReader to query documents
  • SetReader which extends GenericReader with the ability to load deterministic (set account relation) documents
  • PointsReader which wraps both GenericReader to query allocation documents and SetReader to load aggregation documents. Other than needing to use PointsReader.create() instead of new PointsReader(), the public APIs haven't changed.

It also exports 3 writer classes:

  • ListWriter which extends GenericReader with the ability to create non-deterministic (list account relation) documents
  • SetWriter which extends SetReader with the ability to update deterministic (set account relation) documents
  • PointsWriter which wraps both ListWriter to interact with the allocation documents and SetWriter to interact with the aggregation documents. Other than needing to use PointsWriter.fromAuthenticated() instead of new PointsWriter(), the public APIs haven't changed.

@PaulLeCam PaulLeCam requested a review from mzkrasner April 16, 2024 14:48
Copy link
Collaborator

@mzkrasner mzkrasner left a comment

Choose a reason for hiding this comment

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

Looks good - thank you. I will need to update the server example to use the new aggregation interface.

@PaulLeCam PaulLeCam merged commit 59afa95 into main Apr 16, 2024
4 checks passed
@PaulLeCam PaulLeCam deleted the split-points-classes branch April 16, 2024 15:17
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.

2 participants