objectbox / objectbox-dart

Flutter database for super-fast Dart object persistence
https://docs.objectbox.io/getting-started
Apache License 2.0
918 stars 116 forks source link

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

Open MdSaLaMa opened 1 month ago

MdSaLaMa commented 1 month ago

Use case

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

Proposed solution

_ Add QueryCondition elementContains(String part) to QueryStringVectorProperty

greenrobot-team commented 1 month ago

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

MdSaLaMa commented 1 month ago

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()