Skip to content

feat(base-query): add isIn/isNotIn, isNull/isNotNull, and Terminal.count()#94

Merged
deer merged 1 commit into
mainfrom
query_improvements
Jul 3, 2026
Merged

feat(base-query): add isIn/isNotIn, isNull/isNotNull, and Terminal.count()#94
deer merged 1 commit into
mainfrom
query_improvements

Conversation

@deer

@deer deer commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

This adds three query operators to base-query's Condition/Terminal API. Condition.isIn(Collection<V>) performs one reverse-map lookup per value and unions the results when the underlying Indexable function is indexed, falling back to a linear scan otherwise; Condition.isNotIn(Collection<V>) is a default method built on doesNotMatch(values::contains) since negation cannot be answered from a positive reverse-index without enumerating every object. Condition.isNull() and Condition.isNotNull() are thin default wrappers around isEqualTo(null) and isNotEqualTo(null), so they inherit the same indexed-vs-scan behavior for free. Terminal.count() is a small convenience default delegating to findAll().count(), sparing callers from writing that boilerplate themselves.

@deer deer merged commit e9096a0 into main Jul 3, 2026
3 checks passed
@deer deer deleted the query_improvements branch July 3, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant