ezKit 1.12.13__py3-none-any.whl → 1.12.14__py3-none-any.whl
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.
- ezKit/database.py +14 -3
- {ezkit-1.12.13.dist-info → ezkit-1.12.14.dist-info}/METADATA +1 -1
- {ezkit-1.12.13.dist-info → ezkit-1.12.14.dist-info}/RECORD +6 -6
- {ezkit-1.12.13.dist-info → ezkit-1.12.14.dist-info}/WHEEL +0 -0
- {ezkit-1.12.13.dist-info → ezkit-1.12.14.dist-info}/licenses/LICENSE +0 -0
- {ezkit-1.12.13.dist-info → ezkit-1.12.14.dist-info}/top_level.txt +0 -0
ezKit/database.py
CHANGED
@@ -125,7 +125,7 @@ def build_sqlalchemy_where_clause(data: dict) -> Optional[Tuple[str, Dict[str, A
|
|
125
125
|
|
126
126
|
for field, value in data.items():
|
127
127
|
|
128
|
-
#
|
128
|
+
# 特殊处理日期字段
|
129
129
|
if field == "date" or field.startswith("date__"):
|
130
130
|
field = field.replace("date", "datetime::date", 1)
|
131
131
|
|
@@ -136,6 +136,10 @@ def build_sqlalchemy_where_clause(data: dict) -> Optional[Tuple[str, Dict[str, A
|
|
136
136
|
# 避免字段名冲突
|
137
137
|
param_key = f"{base}_{op}"
|
138
138
|
|
139
|
+
# 特殊处理日期字段
|
140
|
+
if param_key.startswith("datetime::date"):
|
141
|
+
param_key = param_key.replace("datetime::date", "datetime_date", 1)
|
142
|
+
|
139
143
|
if op == "like":
|
140
144
|
sql_parts.append(f"{base} LIKE :{param_key}")
|
141
145
|
param_dict[param_key] = f"%{value}%"
|
@@ -165,8 +169,15 @@ def build_sqlalchemy_where_clause(data: dict) -> Optional[Tuple[str, Dict[str, A
|
|
165
169
|
|
166
170
|
else:
|
167
171
|
|
168
|
-
|
169
|
-
|
172
|
+
param_key = field
|
173
|
+
|
174
|
+
# 特殊处理日期字段
|
175
|
+
if param_key.startswith("datetime::date"):
|
176
|
+
param_key = param_key.replace("datetime::date", "datetime_date", 1)
|
177
|
+
|
178
|
+
sql_parts.append(f"{field} = :{param_key}")
|
179
|
+
|
180
|
+
param_dict[param_key] = value
|
170
181
|
|
171
182
|
where_clause = " AND ".join(sql_parts)
|
172
183
|
|
@@ -3,7 +3,7 @@ ezKit/_file.py,sha256=0qRZhwYuagTgTGrhm-tzAMvEQT4HTJA_xZKqF2bo0ho,1207
|
|
3
3
|
ezKit/bottle.py,sha256=43h4v1kzz6qrLvCt5IMN0H-gFtaT0koG9wETqteXsps,181666
|
4
4
|
ezKit/bottle_extensions.py,sha256=27rogmfK7mL2qUSjXH79IMGZbCVULtYEikql_N9O6Zs,1165
|
5
5
|
ezKit/cipher.py,sha256=7jBarRH7ukSYzkz-Anl8B8JzluhnRz4CLHidPRRj_cg,2939
|
6
|
-
ezKit/database.py,sha256=
|
6
|
+
ezKit/database.py,sha256=HK-TquMmlzPlRsiqmnXTGxQrrSHiRx65oOHoE6c4M84,19926
|
7
7
|
ezKit/dockerhub.py,sha256=j-wQO-71BsOgExHZhYynuy2k_hCX3on-vg0TH7QCit4,1996
|
8
8
|
ezKit/http.py,sha256=zhNxJF-x91UqGncXWxVXnhZVpFo_wmmpGnMXVT11y9E,1832
|
9
9
|
ezKit/markdown_to_html.template,sha256=21G2sSVGJn6aJvHd0NN4zY5YiDteKe4UtW36AzBwSdk,22274
|
@@ -15,8 +15,8 @@ ezKit/token.py,sha256=Ac-i9xfq4TqpGyfCzakjrh4NYzxHiN2sCQrMk1tzVi8,1716
|
|
15
15
|
ezKit/utils.py,sha256=VyAw2yEs15VER9RCpMgskx1l0zrSpRlV34X___eOia0,42416
|
16
16
|
ezKit/xftp.py,sha256=-XQXyhMqeigT63P6sXkSS7r4GROXyqqlkzKxITLWG-g,8278
|
17
17
|
ezKit/zabbix.py,sha256=PkMnfu7mcuotwwIIsHaC9FsNg-gap6hD1xvm0AwSL1Y,33777
|
18
|
-
ezkit-1.12.
|
19
|
-
ezkit-1.12.
|
20
|
-
ezkit-1.12.
|
21
|
-
ezkit-1.12.
|
22
|
-
ezkit-1.12.
|
18
|
+
ezkit-1.12.14.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
19
|
+
ezkit-1.12.14.dist-info/METADATA,sha256=aXP1h-OH37Q4mhrUOAW9WnN6sUkEiz4Mvf5swf--IbY,317
|
20
|
+
ezkit-1.12.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
21
|
+
ezkit-1.12.14.dist-info/top_level.txt,sha256=aYLB_1WODsqNTsTFWcKP-BN0KCTKcV-HZJ4zlHkCFw8,6
|
22
|
+
ezkit-1.12.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|