objectbox-dart icon indicating copy to clipboard operation
objectbox-dart copied to clipboard

Query List<String> where element contains( 'part' )

Open MdSaLaMa opened this issue 1 year ago • 2 comments
trafficstars

Use case

_I am trying to query entities with property of type List<String> that have any element contains some text.

Proposed solution

_ Add QueryCondition elementContains(String part) to QueryStringVectorProperty

MdSaLaMa avatar Mar 07 '24 08:03 MdSaLaMa

There is containsElement(), does that work for you?

greenrobot-team avatar Mar 11 '24 07:03 greenrobot-team

containsElement() checks for complete equality, I want to search inside every element in the list if it contains part. Now i deal with that by storing the list as String and use contains()

MdSaLaMa avatar Mar 11 '24 12:03 MdSaLaMa