ezKit 3.0.77__tar.gz → 3.0.78__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.
- {ezkit-3.0.77/ezKit.egg-info → ezkit-3.0.78}/PKG-INFO +1 -1
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/database.py +22 -4
- {ezkit-3.0.77 → ezkit-3.0.78/ezKit.egg-info}/PKG-INFO +1 -1
- {ezkit-3.0.77 → ezkit-3.0.78}/setup.py +1 -1
- {ezkit-3.0.77 → ezkit-3.0.78}/LICENSE +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/MANIFEST.in +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/README.md +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/__init__.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/bandwagon.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/cipher.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/fastapix.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/http.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/markdown_to_html.template +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/markdownx.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/schema.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/sendemail.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/stock.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit/utils.py +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit.egg-info/SOURCES.txt +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit.egg-info/dependency_links.txt +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit.egg-info/requires.txt +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/ezKit.egg-info/top_level.txt +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/pyproject.toml +0 -0
- {ezkit-3.0.77 → ezkit-3.0.78}/setup.cfg +0 -0
|
@@ -628,6 +628,7 @@ class Database:
|
|
|
628
628
|
return None
|
|
629
629
|
|
|
630
630
|
# 先校验全部记录,再执行 INSERT,避免部分输入未验证就写入。
|
|
631
|
+
# 清洗后的数据: value 值
|
|
631
632
|
value = schema.model_validate(parameter, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
632
633
|
|
|
633
634
|
if not value:
|
|
@@ -700,6 +701,7 @@ class Database:
|
|
|
700
701
|
logger.error(f"{info} | invalid parameters")
|
|
701
702
|
return None
|
|
702
703
|
|
|
704
|
+
# 清洗后的数据: where 条件
|
|
703
705
|
where = schema.model_validate(params, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
704
706
|
|
|
705
707
|
if not where:
|
|
@@ -793,9 +795,15 @@ class Database:
|
|
|
793
795
|
logger.error(f"{info} | missing 'values' in parameters")
|
|
794
796
|
return None
|
|
795
797
|
|
|
796
|
-
|
|
798
|
+
# 清洗后的数据: where 和 values
|
|
799
|
+
where_and_values = schema.model_validate(parameter, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
797
800
|
|
|
798
|
-
|
|
801
|
+
if not where_and_values:
|
|
802
|
+
logger.error(f"{info} | invalid parameters")
|
|
803
|
+
return None
|
|
804
|
+
|
|
805
|
+
where = where_and_values.get("where", {})
|
|
806
|
+
values = where_and_values.get("values", {})
|
|
799
807
|
|
|
800
808
|
if not where:
|
|
801
809
|
logger.error(f"{info} | invalid WHERE parameter")
|
|
@@ -887,6 +895,7 @@ class Database:
|
|
|
887
895
|
logger.error(f"{info} | invalid parameters")
|
|
888
896
|
return None
|
|
889
897
|
|
|
898
|
+
# 清洗后的数据: where 条件
|
|
890
899
|
where = schema.model_validate(parameter, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
891
900
|
|
|
892
901
|
if not where:
|
|
@@ -1181,6 +1190,7 @@ class AsyncDatabase:
|
|
|
1181
1190
|
return None
|
|
1182
1191
|
|
|
1183
1192
|
# 先校验全部记录,再执行 INSERT,避免部分输入未验证就写入。
|
|
1193
|
+
# 清洗后的数据: value 值
|
|
1184
1194
|
value = schema.model_validate(parameter, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
1185
1195
|
|
|
1186
1196
|
if not value:
|
|
@@ -1253,6 +1263,7 @@ class AsyncDatabase:
|
|
|
1253
1263
|
logger.error(f"{info} | invalid parameters")
|
|
1254
1264
|
return None
|
|
1255
1265
|
|
|
1266
|
+
# 清洗后的数据: where 条件
|
|
1256
1267
|
where = schema.model_validate(params, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
1257
1268
|
|
|
1258
1269
|
if not where:
|
|
@@ -1346,9 +1357,15 @@ class AsyncDatabase:
|
|
|
1346
1357
|
logger.error(f"{info} | missing 'values' in parameters")
|
|
1347
1358
|
return None
|
|
1348
1359
|
|
|
1349
|
-
|
|
1360
|
+
# 清洗后的数据: where 和 values
|
|
1361
|
+
where_and_values = schema.model_validate(parameter, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
1362
|
+
|
|
1363
|
+
if not where_and_values:
|
|
1364
|
+
logger.error(f"{info} | invalid parameters")
|
|
1365
|
+
return None
|
|
1350
1366
|
|
|
1351
|
-
|
|
1367
|
+
where = where_and_values.get("where", {})
|
|
1368
|
+
values = where_and_values.get("values", {})
|
|
1352
1369
|
|
|
1353
1370
|
if not where:
|
|
1354
1371
|
logger.error(f"{info} | invalid WHERE parameter")
|
|
@@ -1440,6 +1457,7 @@ class AsyncDatabase:
|
|
|
1440
1457
|
logger.error(f"{info} | invalid parameters")
|
|
1441
1458
|
return None
|
|
1442
1459
|
|
|
1460
|
+
# 清洗后的数据: where 条件
|
|
1443
1461
|
where = schema.model_validate(parameter, extra="forbid", strict=True).model_dump(exclude_unset=True)
|
|
1444
1462
|
|
|
1445
1463
|
if not where:
|
|
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
|