|
| 1 | +enum Operators { |
| 2 | + Equal = 'equal', |
| 3 | + NotEqual = 'notEqual', |
| 4 | + GreaterThan = 'greaterThan', |
| 5 | + GreaterThanOrEqual = 'greaterThanOrEqual', |
| 6 | + LessThan = 'lessThan', |
| 7 | + LessThanOrEqual = 'lessThanOrEqual', |
| 8 | + In = 'in', |
| 9 | + NotIn = 'notIn', |
| 10 | + Contains = 'contains', |
| 11 | + NotContains = 'notContains', |
| 12 | + Regex = 'regex' |
| 13 | +} |
| 14 | + |
1 | 15 | export interface QueryOperators<Value> {
|
2 |
| - ne?: Value; // Not equal |
3 |
| - gt?: Value; // Greater than |
4 |
| - gte?: Value; // Greater than or equal to |
5 |
| - lt?: Value; // Less than |
6 |
| - lte?: Value; // Less than or equal to |
7 |
| - in?: Value[]; // In array |
8 |
| - nin?: Value[]; // Not in array |
9 |
| - regex?: RegExp; // Regular expression |
| 16 | + [Operators.Equal]?: Value; // Not equal |
| 17 | + [Operators.NotEqual]?: Value; // Not equal |
| 18 | + [Operators.GreaterThan]?: Value; // Greater than |
| 19 | + [Operators.GreaterThanOrEqual]?: Value; // Greater than or equal |
| 20 | + [Operators.LessThan]?: Value; // Less than |
| 21 | + [Operators.LessThanOrEqual]?: Value; // Less than or equal |
| 22 | + [Operators.In]?: Value[]; // In |
| 23 | + [Operators.NotIn]?: Value[]; // Not in |
| 24 | + [Operators.Contains]?: Value; // Contains |
| 25 | + [Operators.NotContains]?: Value; // Not contains |
| 26 | + [Operators.Regex]?: RegExp; // Regex |
10 | 27 | }
|
11 | 28 |
|
12 | 29 | export type QueryOptions<Value> =
|
|
0 commit comments