ezKit 1.12.37__tar.gz → 1.12.39__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-1.12.37/ezKit.egg-info → ezkit-1.12.39}/PKG-INFO +1 -1
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/database.py +4 -3
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/errors.py +1 -1
- {ezkit-1.12.37 → ezkit-1.12.39/ezKit.egg-info}/PKG-INFO +1 -1
- {ezkit-1.12.37 → ezkit-1.12.39}/setup.py +1 -1
- {ezkit-1.12.37 → ezkit-1.12.39}/LICENSE +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/MANIFEST.in +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/README.md +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/__init__.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/_file.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/bottle.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/bottle_extensions.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/cipher.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/dockerhub.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/fastapix.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/http.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/markdown_to_html.template +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/mongo.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/qywx.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/redis.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/sendemail.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/token.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/utils.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/xftp.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit/zabbix.py +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit.egg-info/SOURCES.txt +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit.egg-info/dependency_links.txt +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit.egg-info/requires.txt +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/ezKit.egg-info/top_level.txt +0 -0
- {ezkit-1.12.37 → ezkit-1.12.39}/setup.cfg +0 -0
@@ -40,6 +40,7 @@ def get_limit_offset(page_index: int, page_size: int) -> tuple[int, int]:
|
|
40
40
|
page_size (int): 每页数量, 必须 > 0
|
41
41
|
|
42
42
|
返回:
|
43
|
+
|
43
44
|
(limit, offset): limit 表示取多少条,offset 表示跳过多少条
|
44
45
|
"""
|
45
46
|
try:
|
@@ -60,7 +61,7 @@ def get_limit_offset(page_index: int, page_size: int) -> tuple[int, int]:
|
|
60
61
|
|
61
62
|
except Exception as e:
|
62
63
|
logger.exception(e)
|
63
|
-
return
|
64
|
+
return 10, 0
|
64
65
|
|
65
66
|
|
66
67
|
# --------------------------------------------------------------------------------------------------
|
@@ -731,7 +732,7 @@ async def async_create_and_count(db: DatabaseAsyncSession, schema: Type[Declarat
|
|
731
732
|
async def async_read_and_count(db: DatabaseAsyncSession, table_name: str, data: dict, statement_prefix: str, statement_end: str = "") -> dict:
|
732
733
|
|
733
734
|
# 初始返回结果 (适用于 count 等于 0)
|
734
|
-
result = {"count": 0, "
|
735
|
+
result = {"count": 0, "list": [], "pageIndex": data["pageIndex"], "pageSize": 0}
|
735
736
|
|
736
737
|
# ----------------------------------------------------------------------------------------------
|
737
738
|
|
@@ -770,7 +771,7 @@ async def async_read_and_count(db: DatabaseAsyncSession, table_name: str, data:
|
|
770
771
|
|
771
772
|
# 数据整合
|
772
773
|
result["count"] = count_result
|
773
|
-
result["
|
774
|
+
result["list"] = read_result
|
774
775
|
result["pageSize"] = len(read_result)
|
775
776
|
|
776
777
|
# ----------------------------------------------------------------------------------------------
|
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
|