UNPKG

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