v2.5.3
✨ Comparators
You can use comparators like is_ne
, is_gt
, is_lt
, is_gte
, is_lte
, etc..
from abstra.tables import select
users = select("users", where={"age": is_gt(18)}) # age > 18
users = select("users", where={"age": is_between(18, 30)}) # 18 <= age <= 30
Here is the full list of comparators:
Function Name | SQL Equivalent | Description |
---|---|---|
is_eq(value) |
... = value |
Is equal to the value |
is_neq(value) |
... <> value |
Is not equal to the value |
is_gt(value) |
... > value |
Is greater than the value |
is_between(value1, value2) |
... BETWEEN value1 AND value2 |
Is between value1 and value2 |
is_gte(value) |
... >= value |
Is greater than or equal to the value |
is_in(value) |
... IN value |
Is in the list of values |
is_lt(value) |
... < value |
Is less than the value |
is_like(value) |
... LIKE value |
Matches the pattern in value |
is_lte(value) |
... <= value |
Is less than or equal to the value |
is_not_in(value) |
... NOT IN value |
Is not in the list of values |
is_not_like(value) |
... NOT LIKE value |
Does not match the pattern in value |
is_null() |
... IS NULL |
Is null |
is_not_null() |
... IS NOT NULL |
Is not null |
is_ilike(value) |
... ILIKE value |
Case-insensitive version of is_like |
is_not_ilike(value) |
... NOT ILIKE value |
Case-insensitive version of is_not_like |
Also, this release includes a few extra features and bug fixes:
- Deprecate
abstra serve
in favor ofabstra editor
- Improve logo field description
- Improve transition labels
- Update links with on brand color