objectbox / objectbox/objectbox-java
Queries: Support "notIn" with string arrays like "in" does
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
On queries, you can use string array "overloads" for in in the following ways:
QueryBuilder<T> in(Property<T> property, String[] values)
QueryBuilder<T> in(Property<T> property, String[] values, StringOrder order)
The same "overloads" are not supported for notIn though, which only supports int and long arrays

Edit: additional suggestions via #1129:
- Implement
doesNotContain,doesNotEndWith,doesNotStartWithintoPropertyor- Create
QueryCondition.not()that would allow to negate any given QueryConditionExample use case for the latter :
Character_.lastName.equal("lannister", QueryBuilder.StringOrder.CASE_INSENSITIVE) .and(Character_.firstName.startsWith("ty", QueryBuilder.StringOrder.CASE_INSENSITIVE)) // "Tywin", "Tyrion", "Tytos" Character_.lastName.equal("lannister", QueryBuilder.StringOrder.CASE_INSENSITIVE) .and(Character_.firstName.startsWith("ty", QueryBuilder.StringOrder.CASE_INSENSITIVE).not()) // "Cersei", "Jaime", "Lancel"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the QueryBuilder and Property query APIs named in the issue, comparing the existing string-array in overloads with the int- and long-array notIn overloads. Trace the related query tests, then confirm that string-array notIn supports the same overload forms and behavior as in.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100