Improvement on Collection Filters #35
enisn
announced in
Announcements
Replies: 1 comment
-
Related issue for development: #36 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, I got a feedback for filtering over collections. AutoFilterer doesn't cover some advanced scenarios while filtering collections. After some investigations, I explored there are 6 possible situations to generate queries over collections and each situation has different options inside it such as
All
orAny
selection, etc. So I created a chart about possibilities and planned to develop it in the next version.Property Types of Filter and Source
Filter object and entity object properties can be 4 different types such as:
p
: Primitive Type{}
: Complex Type (Class & Filter Type)[]
: Collection[p]
: Collection of Primitive Type[{}]
: Collection of Complex TypePossible Scenarios
There are 6 possibilities while generating filters for collections. 2 of them are already covered by AutoFilterer currently. Those possibilities depend on Property types of Filter and Source Objects. When a Filter object property is a collection, the query must be generated with Contains method. But there is more a couple of possibilities:
Any/All
method. For MongoDb modelsAll/Any
methodto understand how to generate query.Beta Was this translation helpful? Give feedback.
All reactions