operators.js
2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
'use strict';
/**
* Operator symbols to be used when querying data
*
* @see {@link Model#where}
*
* @property eq
* @property ne
* @property gte
* @property gt
* @property lte
* @property lt
* @property not
* @property is
* @property in
* @property notIn
* @property like
* @property notLike
* @property iLike
* @property notILike
* @property startsWith
* @property endsWith
* @property substring
* @property regexp
* @property notRegexp
* @property iRegexp
* @property notIRegexp
* @property between
* @property notBetween
* @property overlap
* @property contains
* @property contained
* @property adjacent
* @property strictLeft
* @property strictRight
* @property noExtendRight
* @property noExtendLeft
* @property and
* @property or
* @property any
* @property all
* @property values
* @property col
* @property placeholder
* @property join
*/
const Op = {
eq: Symbol.for('eq'),
ne: Symbol.for('ne'),
gte: Symbol.for('gte'),
gt: Symbol.for('gt'),
lte: Symbol.for('lte'),
lt: Symbol.for('lt'),
not: Symbol.for('not'),
is: Symbol.for('is'),
in: Symbol.for('in'),
notIn: Symbol.for('notIn'),
like: Symbol.for('like'),
notLike: Symbol.for('notLike'),
iLike: Symbol.for('iLike'),
notILike: Symbol.for('notILike'),
startsWith: Symbol.for('startsWith'),
endsWith: Symbol.for('endsWith'),
substring: Symbol.for('substring'),
regexp: Symbol.for('regexp'),
notRegexp: Symbol.for('notRegexp'),
iRegexp: Symbol.for('iRegexp'),
notIRegexp: Symbol.for('notIRegexp'),
between: Symbol.for('between'),
notBetween: Symbol.for('notBetween'),
overlap: Symbol.for('overlap'),
contains: Symbol.for('contains'),
contained: Symbol.for('contained'),
adjacent: Symbol.for('adjacent'),
strictLeft: Symbol.for('strictLeft'),
strictRight: Symbol.for('strictRight'),
noExtendRight: Symbol.for('noExtendRight'),
noExtendLeft: Symbol.for('noExtendLeft'),
and: Symbol.for('and'),
or: Symbol.for('or'),
any: Symbol.for('any'),
all: Symbol.for('all'),
values: Symbol.for('values'),
col: Symbol.for('col'),
placeholder: Symbol.for('placeholder'),
join: Symbol.for('join')
};
module.exports = Op;