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

refactor: move local scopes to custom query builders #11

Draft
wants to merge 14 commits into
base: models-from-container
Choose a base branch
from

Conversation

a-drew
Copy link
Member

@a-drew a-drew commented Nov 26, 2021

Summary

For the sake of better static analysis (not sure there's much of a change for me) and cleaner / simpler models, this PR proposes to move local scopes seen in revision / checkpoint into their own query builder objects.

I've also expanded on the available scopes for revisions. Broken down bigger chunks into small scopes and even moved over the whereIn query from the global scope to the builder. This will make it easier to override specific constraints used to fetch revisions closest to a moment as well as re-use the same scopes for fetching latest content inside of a timeline.

Testing

While this is a refactor, it does move some key methods that would be customized when implementing this package so there could be broken changes. Otherwise, this is ready when both psalm and existing tests are 🟢

@a-drew a-drew marked this pull request as draft December 15, 2021 16:55
@a-drew
Copy link
Member Author

a-drew commented Dec 15, 2021

Converting to draft until I can get back to this and resolve the failing tests

@a-drew a-drew force-pushed the move-local-scopes-to-custom-query-builders branch from 7833f1e to f17afda Compare January 4, 2022 16:19
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.

3 participants