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

add contains method in QueryBuilder for array properties (like BooleanArray,IntArray,LongArray in Kotlin)

Open amoikevin opened this issue 7 months ago • 1 comments

Is there an existing issue?

Use case

class Entity {
    var ids: LongArray? = null
}

fun QueryBuilder<Entity>.filter(id: Long) {
    contains(Entity_.ids, id)
}

Proposed solution

public QueryBuilder<T> contains(Property<T> property, bool value) 
public QueryBuilder<T> contains(Property<T> property, int value) 
public QueryBuilder<T> contains(Property<T> property, long value) 

Alternatives

TODO Describe any alternative solutions or features you've considered.

Additional context

TODO Add any other context (e.g. platform or language) about the feature request here.

amoikevin avatar Jun 18 '25 06:06 amoikevin

Thanks for the suggestion! For anyone else interested, please thumbs up the first post. It helps us when deciding on new features.

greenrobot-team avatar Jun 24 '25 04:06 greenrobot-team