ezKit 1.12.30__tar.gz → 1.12.32__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.
Files changed (30) hide show
  1. {ezkit-1.12.30/ezKit.egg-info → ezkit-1.12.32}/PKG-INFO +1 -1
  2. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/database.py +4 -6
  3. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/errors.py +4 -0
  4. {ezkit-1.12.30 → ezkit-1.12.32/ezKit.egg-info}/PKG-INFO +1 -1
  5. {ezkit-1.12.30 → ezkit-1.12.32}/setup.py +1 -1
  6. {ezkit-1.12.30 → ezkit-1.12.32}/LICENSE +0 -0
  7. {ezkit-1.12.30 → ezkit-1.12.32}/MANIFEST.in +0 -0
  8. {ezkit-1.12.30 → ezkit-1.12.32}/README.md +0 -0
  9. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/__init__.py +0 -0
  10. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/_file.py +0 -0
  11. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/bottle.py +0 -0
  12. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/bottle_extensions.py +0 -0
  13. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/cipher.py +0 -0
  14. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/dockerhub.py +0 -0
  15. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/fastapix.py +0 -0
  16. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/http.py +0 -0
  17. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/markdown_to_html.template +0 -0
  18. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/mongo.py +0 -0
  19. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/qywx.py +0 -0
  20. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/redis.py +0 -0
  21. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/sendemail.py +0 -0
  22. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/token.py +0 -0
  23. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/utils.py +0 -0
  24. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/xftp.py +0 -0
  25. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit/zabbix.py +0 -0
  26. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit.egg-info/SOURCES.txt +0 -0
  27. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit.egg-info/dependency_links.txt +0 -0
  28. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit.egg-info/requires.txt +0 -0
  29. {ezkit-1.12.30 → ezkit-1.12.32}/ezKit.egg-info/top_level.txt +0 -0
  30. {ezkit-1.12.30 → ezkit-1.12.32}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.30
3
+ Version: 1.12.32
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -705,7 +705,7 @@ class DatabaseAsyncSession:
705
705
  # --------------------------------------------------------------------------------------------------
706
706
 
707
707
 
708
- async def db_async_create(db: DatabaseAsyncSession, schema: Type[DeclarativeBase], data: list) -> dict:
708
+ async def async_create_and_count(db: DatabaseAsyncSession, schema: Type[DeclarativeBase], data: list) -> dict:
709
709
 
710
710
  # 插入数据
711
711
  result = await db.operater(insert(schema), data)
@@ -720,7 +720,7 @@ async def db_async_create(db: DatabaseAsyncSession, schema: Type[DeclarativeBase
720
720
  # --------------------------------------------------------------------------------------------------
721
721
 
722
722
 
723
- async def db_async_read(db: DatabaseAsyncSession, table_name: str, data: dict, statement_prefix: str, statement_end: str = "") -> dict:
723
+ async def async_read_and_count(db: DatabaseAsyncSession, table_name: str, data: dict, statement_prefix: str, statement_end: str = "") -> dict:
724
724
 
725
725
  # 初始返回结果 (适用于 count 等于 0)
726
726
  result = {"count": 0, "data": None, "pageIndex": data["pageIndex"], "pageSize": 0}
@@ -759,8 +759,6 @@ async def db_async_read(db: DatabaseAsyncSession, table_name: str, data: dict, s
759
759
  {statement_prefix}
760
760
  {where_clause}
761
761
  {statement_end}
762
- LIMIT :limit
763
- OFFSET :offset;
764
762
  """
765
763
  ).bindparams(*bind_params)
766
764
 
@@ -782,7 +780,7 @@ async def db_async_read(db: DatabaseAsyncSession, table_name: str, data: dict, s
782
780
  # --------------------------------------------------------------------------------------------------
783
781
 
784
782
 
785
- async def db_async_update(db: DatabaseAsyncSession, table_name: str, data: dict) -> dict:
783
+ async def async_update_and_count(db: DatabaseAsyncSession, table_name: str, data: dict) -> dict:
786
784
 
787
785
  # 构建 WHERE
788
786
 
@@ -832,7 +830,7 @@ async def db_async_update(db: DatabaseAsyncSession, table_name: str, data: dict)
832
830
  # --------------------------------------------------------------------------------------------------
833
831
 
834
832
 
835
- async def db_async_delete(db: DatabaseAsyncSession, table_name: str, data: dict) -> dict:
833
+ async def async_delete_and_count(db: DatabaseAsyncSession, table_name: str, data: dict) -> dict:
836
834
 
837
835
  # 构建 WHERE
838
836
 
@@ -32,6 +32,10 @@ database_error = {
32
32
  "code": 3004,
33
33
  "message": "Database delete data error",
34
34
  },
35
+ "no_data": {
36
+ "code": 3005,
37
+ "message": "Database no data found",
38
+ },
35
39
  }
36
40
 
37
41
  # SQLAlchemy错误: 4000
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 1.12.30
3
+ Version: 1.12.32
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
4
4
 
5
5
  setup(
6
6
  name="ezKit",
7
- version="1.12.30",
7
+ version="1.12.32",
8
8
  author="septvean",
9
9
  author_email="septvean@gmail.com",
10
10
  description="Easy Kit",
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