ezKit 1.12.37__py3-none-any.whl → 1.12.39__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 CHANGED
@@ -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 1, 10
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, "data": [], "pageIndex": data["pageIndex"], "pageSize": 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["data"] = read_result
774
+ result["list"] = read_result
774
775
  result["pageSize"] = len(read_result)
775
776
 
776
777
  # ----------------------------------------------------------------------------------------------
ezKit/errors.py CHANGED
@@ -26,7 +26,7 @@ database_error = {
26
26
  },
27
27
  "update": {
28
28
  "code": 3003,
29
- "message": "Database create data error",
29
+ "message": "Database update data error",
30
30
  },
31
31
  "delete": {
32
32
  "code": 3004,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.37
3
+ Version: 1.12.39
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -3,9 +3,9 @@ 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=WhHh-4L8uhqvDr7oIOPUk0jXLfLv0AVPAAKrOzhhxzQ,30239
6
+ ezKit/database.py,sha256=z5NM8pusBCEPF8Gize2cvp-XWUimP_CIsrEhBeciTmQ,30240
7
7
  ezKit/dockerhub.py,sha256=j-wQO-71BsOgExHZhYynuy2k_hCX3on-vg0TH7QCit4,1996
8
- ezKit/errors.py,sha256=htTi7vKClHGHf2MX2G88PKr0zzUrFiUHEsrmfqj1Fx8,1425
8
+ ezKit/errors.py,sha256=92PggwPQfTS3Vg4og7GHYnO9CTSM7zmuh2w3kx_tSBE,1425
9
9
  ezKit/fastapix.py,sha256=-nz565ASKvp3nGs9J4wORTHxlhMozqCwv8zREWpmYtI,3382
10
10
  ezKit/http.py,sha256=zhNxJF-x91UqGncXWxVXnhZVpFo_wmmpGnMXVT11y9E,1832
11
11
  ezKit/markdown_to_html.template,sha256=21G2sSVGJn6aJvHd0NN4zY5YiDteKe4UtW36AzBwSdk,22274
@@ -17,8 +17,8 @@ ezKit/token.py,sha256=Ac-i9xfq4TqpGyfCzakjrh4NYzxHiN2sCQrMk1tzVi8,1716
17
17
  ezKit/utils.py,sha256=U457ahFkxIXuB-qWvS3995xJs-LlkFIX5_ZWVgmL5cY,43130
18
18
  ezKit/xftp.py,sha256=-XQXyhMqeigT63P6sXkSS7r4GROXyqqlkzKxITLWG-g,8278
19
19
  ezKit/zabbix.py,sha256=PkMnfu7mcuotwwIIsHaC9FsNg-gap6hD1xvm0AwSL1Y,33777
20
- ezkit-1.12.37.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
21
- ezkit-1.12.37.dist-info/METADATA,sha256=Dc9xJPT4p0iqDczuhL7-qkBtf-4Cuk9RSFMUV3JEQSc,317
22
- ezkit-1.12.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- ezkit-1.12.37.dist-info/top_level.txt,sha256=aYLB_1WODsqNTsTFWcKP-BN0KCTKcV-HZJ4zlHkCFw8,6
24
- ezkit-1.12.37.dist-info/RECORD,,
20
+ ezkit-1.12.39.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
21
+ ezkit-1.12.39.dist-info/METADATA,sha256=KKF9rhoorhoEcup3b6vhxAvyE2SZGVnifoiwpGP-_fg,317
22
+ ezkit-1.12.39.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ ezkit-1.12.39.dist-info/top_level.txt,sha256=aYLB_1WODsqNTsTFWcKP-BN0KCTKcV-HZJ4zlHkCFw8,6
24
+ ezkit-1.12.39.dist-info/RECORD,,