-
Notifications
You must be signed in to change notification settings - Fork 98
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
Use LinkableSpecSet
in WhereFilterSpec
#1335
Conversation
…WhereFilterSpec`. This allows it to be serializable.
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
e35d7d1
to
24758ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -61,7 +66,7 @@ def merge(self, other: WhereFilterSpec) -> WhereFilterSpec: # noqa: D102 | |||
return WhereFilterSpec( | |||
where_sql=f"({self.where_sql}) AND ({other.where_sql})", | |||
bind_parameters=self.bind_parameters.combine(other.bind_parameters), | |||
linkable_specs=ordered_dedupe(self.linkable_specs, other.linkable_specs), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the ordering matter from the previous code? Just checking since it looks like it was removed in the new code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .dedupe()
call is actually ordered, so it should be the same.
In
WhereFilterSpec
, the fieldlinkable_specs
can't be used withSerializableDataclass
since it's an interface. This PR changes that field to aLinkableSpecSet
.