Skip to content

Conversation

@jameskentdev
Copy link

@jameskentdev jameskentdev commented Sep 20, 2025

Summary

This PR is the start of adding support for filtering with OR instead of only AND as mentioned in the docs. The solution is the one proposed in #415, which introduces a new type as follows:

@type combinator :: %Combinator{type: :and | :or, filters: [Filter.t() | combinator()]}

The changes focus on just introducing the new type, and adding support for it inside Flop.Validate.

To get this to work, I introduced a new library - polymorphic_embed. This makes it easier to support filters containing either a Filter or a Combinator type.

@woylie
Copy link
Owner

woylie commented Sep 20, 2025

Hey @jameskentdev, thanks for working on this. I don't want to add a dependency for this, though. Could you find another way to implement this?

@jameskentdev
Copy link
Author

I took a look at some other approaches in jameskentdev#1, I'm still working on finishing it up. Just for arguments sake I did also add the last few changes here to get it all working with this dependency.

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