cube-js / cube-js/cube

Additional Filter Operators

Open
#3,369 2 comments 0 reactions 0 assignees View on GitHub
api:rest help wanted
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Is your feature request related to a problem? Please describe.**
I'm working on an internal reporting tool and wondered about the filter operators. First of all we would like to have a `inNumberRange`/`notInNumberRange` to allow an easy filter like "invoices with a gross value between x and y" similar to the `inDateRange` variants. Also we would like to have a `afterOrEqualDate` (`>=`) as a variant of `afterDate` (`>`) that includes the given date in the range.

While we could reproduce the number range with the given operators `gt`, `gte`, `lt`, `lte` and the logic `and`/`or`, at the moment there is no easy way to have a `>=` check with dates.

**Describe the solution you'd like**
While reading the documentation about filter operators my first thought was why there are the `beforeDate` and `afterDate` operators at all. As far as i can tell those are just `lt` and `gt` with a fancy name. It would be awesome to just be able to use `gt`, `gte`, `lt`, `lte` for dates as well as numbers, and having a new `[not]between` operator that replaces the date range operators and can be used with number and time?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.