cloudoll 2.2.30__tar.gz → 2.2.31__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloudoll-2.2.30 → cloudoll-2.2.31}/PKG-INFO +1 -1
- cloudoll-2.2.31/cloudoll/__init__.py +1 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/field.py +18 -3
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll.egg-info/PKG-INFO +1 -1
- cloudoll-2.2.30/cloudoll/__init__.py +0 -1
- {cloudoll-2.2.30 → cloudoll-2.2.31}/LICENSE +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/README.md +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/__main__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/cli.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/error/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/error/errors.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/logging/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/mail/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/mail/smtp.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/base.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/err.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/model.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/mysql.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/parse.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/orm/postgres.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/robot/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/robot/dingtalk.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/robot/feishu.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/robot/slack.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/utils/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/utils/common.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/utils/m2d.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/utils/patch_loop.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/utils/snowflake.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/utils/watch.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/web/__init__.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/web/exception.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/web/html.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/web/http.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/web/jwt.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll/web/settings.py +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll.egg-info/SOURCES.txt +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll.egg-info/dependency_links.txt +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll.egg-info/entry_points.txt +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll.egg-info/requires.txt +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/cloudoll.egg-info/top_level.txt +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/setup.cfg +0 -0
- {cloudoll-2.2.30 → cloudoll-2.2.31}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.2.31"
|
|
@@ -52,7 +52,6 @@ OP = objdict(
|
|
|
52
52
|
DATE_FORMAT="DATE_FORMAT",
|
|
53
53
|
JSON_CONTAINS_OBJECT="JSON_CONTAINS_OBJECT",
|
|
54
54
|
JSON_CONTAINS_ARRAY="JSON_CONTAINS_ARRAY",
|
|
55
|
-
GROUP_CONCAT='GROUP_CONCAT',
|
|
56
55
|
COUNT="COUNT",
|
|
57
56
|
COUNT_WHEN="COUNT_WHEN",
|
|
58
57
|
SUM_WHEN="SUM_WHEN",
|
|
@@ -70,6 +69,7 @@ OP = objdict(
|
|
|
70
69
|
NOT_BETWEEN="NOT BETWEEN",
|
|
71
70
|
REGEXP="REGEXP",
|
|
72
71
|
IREGEXP="IREGEXP",
|
|
72
|
+
GROUP_CONCAT="GROUP_CONCAT",
|
|
73
73
|
DISTINCT="DISTINCT",
|
|
74
74
|
CONCAT="||",
|
|
75
75
|
BITWISE_NEGATION="~",
|
|
@@ -114,8 +114,11 @@ class FieldBase(object):
|
|
|
114
114
|
ilike = _op(OP.ILIKE) # ilike for pg
|
|
115
115
|
not_like = _op(OP.NOT_LIKE) # not like
|
|
116
116
|
|
|
117
|
+
def group_concat(self, *arg):
|
|
118
|
+
return Function(self, OP.GROUP_CONCAT, arg)
|
|
119
|
+
|
|
117
120
|
def distinct(self, *arg):
|
|
118
|
-
return
|
|
121
|
+
return Function(self, OP.DISTINCT, arg)
|
|
119
122
|
|
|
120
123
|
def desc(self):
|
|
121
124
|
return Expression(self, OP.DESC, None)
|
|
@@ -380,7 +383,19 @@ class Function(FieldBase):
|
|
|
380
383
|
c, v, v1, v2 = deconstruct(self.rpt)
|
|
381
384
|
return f"MIN(CASE WHEN {c} THEN {v1} ELSE {v2} END)", [v]
|
|
382
385
|
elif op == OP.GROUP_CONCAT:
|
|
383
|
-
|
|
386
|
+
arg = self.rpt
|
|
387
|
+
extra = None
|
|
388
|
+
if len(arg) == 0:
|
|
389
|
+
extra = col_name
|
|
390
|
+
elif len(arg) == 1 and isinstance(arg[0], FieldBase):
|
|
391
|
+
extra = f"{arg[0].op} {arg[0].col.name}"
|
|
392
|
+
else:
|
|
393
|
+
# todo : DISTINCT name ORDER BY name ASC SEPARATOR '; '
|
|
394
|
+
extra = col_name
|
|
395
|
+
|
|
396
|
+
return f"GROUP_CONCAT({extra})", None
|
|
397
|
+
elif op == OP.DISTINCT:
|
|
398
|
+
return f"DISTINCT {col_name}", None
|
|
384
399
|
|
|
385
400
|
|
|
386
401
|
class Expression(FieldBase):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.30"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|