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

Remove unneeded unscope values #159

Merged
merged 1 commit into from
May 7, 2024

Conversation

wata727
Copy link
Contributor

@wata727 wata727 commented Apr 9, 2024

Unscope values in the bitemporal_default_scope were introduced in this commit.

Since it is faster to build a query explicitly with a where clause than with a scope call, we hacked the unscope_values that Active Record uses internally and implemented overrides of valid_from/to and transaction_from/to.

However, in the next commit, where! is replaced by _valid_from_lteq and _valid_to_gt, which use rewhere. When using rewhere, there is no need to override the original condition by unscoped values, so this can simply be removed.

@wata727 wata727 marked this pull request as ready for review April 9, 2024 10:44
@auto-assign auto-assign bot requested review from mkmn and QWYNG April 9, 2024 10:44
@wata727 wata727 requested a review from osyo-manga April 9, 2024 10:44
Copy link
Contributor

@mkmn mkmn left a comment

Choose a reason for hiding this comment

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

👍

@wata727 wata727 merged commit 60bcbcb into kufu:master May 7, 2024
10 of 14 checks passed
@wata727 wata727 deleted the remove_unneeded_unscope_values branch May 7, 2024 05:45
@wata727 wata727 mentioned this pull request May 8, 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.

None yet

3 participants