objectbox / objectbox/objectbox-java

Add query filters for greater-than-or-equal/less-than-or-equal

Open
#697 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.6k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

Especially with date comparisons it's unpleasant to write stuff like

val query = boxForEvents
    .query()
    .greater(Event_.startTime, instant.minusNanos(1).toString())
    .build()

Having something like geq()/leq() would definitely help.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the query() builder and its greater(...) comparison shown in the issue. Trace how query filters are exposed and represented, then add equivalent greater-than-or-equal and less-than-or-equal entry points for date comparisons; done means callers no longer need to subtract or add a small time interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.