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
|
"""define opeators used in SQL expressions"""
from operator import and_, or_, inv, add, mul, sub, div, mod, truediv, lt, le, ne, gt, ge, eq
def from_():
raise NotImplementedError()
def as_():
raise NotImplementedError()
def exists():
raise NotImplementedError()
def is_():
raise NotImplementedError()
def isnot():
raise NotImplementedError()
def like_op(a, b):
return a.like(b)
def notlike_op(a, b):
raise NotImplementedError()
def ilike_op(a, b):
return a.ilike(b)
def notilike_op(a, b):
raise NotImplementedError()
def between_op(a, b):
return a.between(b)
def in_op(a, b):
return a.in_(*b)
def notin_op(a, b):
raise NotImplementedError()
def distinct_op(a):
return a.distinct()
def startswith_op(a, b):
return a.startswith(b)
def endswith_op(a, b):
return a.endswith(b)
def comma_op(a, b):
raise NotImplementedError()
def concat_op(a, b):
return a.concat(b)
def desc_op(a):
return a.desc()
def asc_op(a):
return a.asc()
|