I'm trying to find a good pattern or way to abstract out any use case specific filtering for CRUD calls.
If my gateway is what the interactor is using to persist or get data from the database and if it's the gateway ultimately making the calls to the Data Layer Entities that ultimately create the parameterized SQL that's then sent to the DB, even if you keep or build a Data Layer with entities that share as much logic possible to stitch together queries dynamically or whatever, how do you still keep the use case specific filtering, sorting, etc. requests out of the gateway?
I feel like if I have Use Case A, and it requires to filter data specfic to that use case, then it should be requested in the interactor to the gateway. How are you abstracting the set of filtering being requested and how are you sending those filter requests to the gateway for CRUD peristence; how is the gateway receiving those filter requests?
Just looking for ideas because I don't want my gateway methods coupled to use case filtering logic, stuff like that.