... | ... | @@ -124,3 +124,41 @@ Filter records that the right value is less than the one provided, which can be |
|
|
```
|
|
|
UPPER("events"."period") < value
|
|
|
```
|
|
|
|
|
|
#### `:real_containing` as `.period_real_containing(value)` **(ONLY WITH THRESHOLD)**
|
|
|
Checks if the value contains in the range while considering the threshold. You can pass either an Arel attribute or a plain value.
|
|
|
```
|
|
|
tsrange(LOWER("events"."period") - "events"."interval",UPPER("events"."period") + "events"."interval") @> value
|
|
|
```
|
|
|
|
|
|
#### `:real_overlapping` as `.period_real_overlapping(left, right = nil)` **(ONLY WITH THRESHOLD)**
|
|
|
Checks if two ranges overlap while considering the threshold. You can pass either another range column as an Arel attribute, a plain range on the left, or the 2 parts of a range.
|
|
|
```
|
|
|
tsrange(LOWER("events"."period") - "events"."interval",UPPER("events"."period") + "events"."interval") && value
|
|
|
- OR -
|
|
|
tsrange(LOWER("events"."period") - "events"."interval",UPPER("events"."period") + "events"."interval") && tsrange(left, right)
|
|
|
```
|
|
|
|
|
|
#### `:real_starting_after` as `.period_real_starting_after(value)`
|
|
|
Filter records that the left value with the threshold is greater than the one provided, which can be either an Arel attribute or a plain value.
|
|
|
```
|
|
|
(LOWER("events"."period") - "events"."interval") > value
|
|
|
```
|
|
|
|
|
|
#### `:real_starting_before` as `.period_real_starting_before(value)`
|
|
|
Filter records that the left value with the threshold is less than the one provided, which can be either an Arel attribute or a plain value.
|
|
|
```
|
|
|
(LOWER("events"."period") - "events"."interval") < value
|
|
|
```
|
|
|
|
|
|
#### `:real_finishing_after` as `.period_real_finishing_after(value)`
|
|
|
Filter records that the right value with the threshold is greater than the one provided, which can be either an Arel attribute or a plain value.
|
|
|
```
|
|
|
(UPPER("events"."period") + "events"."interval") > value
|
|
|
```
|
|
|
|
|
|
#### `:real_finishing_before` as `.period_real_finishing_before(value)`
|
|
|
Filter records that the right value with the threshold is less than the one provided, which can be either an Arel attribute or a plain value.
|
|
|
```
|
|
|
(UPPER("events"."period") + "events"."interval") < value
|
|
|
``` |
|
|
\ No newline at end of file |