database-wrapper 0.1.42__py3-none-any.whl → 0.1.44__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.
- database_wrapper/config.py +3 -3
- database_wrapper/db_backend.py +2 -2
- database_wrapper/db_data_model.py +1 -4
- {database_wrapper-0.1.42.dist-info → database_wrapper-0.1.44.dist-info}/METADATA +5 -5
- {database_wrapper-0.1.42.dist-info → database_wrapper-0.1.44.dist-info}/RECORD +7 -7
- {database_wrapper-0.1.42.dist-info → database_wrapper-0.1.44.dist-info}/WHEEL +0 -0
- {database_wrapper-0.1.42.dist-info → database_wrapper-0.1.44.dist-info}/top_level.txt +0 -0
database_wrapper/config.py
CHANGED
|
@@ -3,7 +3,7 @@ from typing import Any
|
|
|
3
3
|
CONFIG: dict[str, Any] = {
|
|
4
4
|
# These are supposed to be set automatically by a git pre-compile script
|
|
5
5
|
# They are one git commit hash behind, if used automatically
|
|
6
|
-
"git_commit_hash": "
|
|
7
|
-
"git_commit_date": "15.11.2024
|
|
8
|
-
"app_version": "0.1.
|
|
6
|
+
"git_commit_hash": "ec2eca45cd9798f0c045418602fbe07ed7734848",
|
|
7
|
+
"git_commit_date": "15.11.2024 18:06",
|
|
8
|
+
"app_version": "0.1.44",
|
|
9
9
|
}
|
database_wrapper/db_backend.py
CHANGED
|
@@ -51,9 +51,9 @@ class DatabaseBackend:
|
|
|
51
51
|
self.connection = None
|
|
52
52
|
self.cursor = None
|
|
53
53
|
self.shutdownRequested = Event()
|
|
54
|
-
self.contextConnection = ContextVar(f"
|
|
54
|
+
self.contextConnection = ContextVar(f"db_connection_{self.name}", default=None)
|
|
55
55
|
self.contextAsyncConnection = ContextVar(
|
|
56
|
-
f"
|
|
56
|
+
f"db_connection_{self.name}_async", default=None
|
|
57
57
|
)
|
|
58
58
|
|
|
59
59
|
def __del__(self) -> None:
|
|
@@ -5,12 +5,9 @@ import dataclasses
|
|
|
5
5
|
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from dataclasses import dataclass, field, asdict
|
|
8
|
-
|
|
9
8
|
from decimal import Decimal
|
|
10
9
|
from typing import Any
|
|
11
10
|
|
|
12
|
-
from psycopg import sql
|
|
13
|
-
|
|
14
11
|
|
|
15
12
|
@dataclass
|
|
16
13
|
class DBDataModel:
|
|
@@ -264,7 +261,7 @@ class DBDataModel:
|
|
|
264
261
|
### Database methods ###
|
|
265
262
|
########################
|
|
266
263
|
|
|
267
|
-
def queryBase(self) ->
|
|
264
|
+
def queryBase(self) -> Any:
|
|
268
265
|
"""
|
|
269
266
|
Base query for all queries
|
|
270
267
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: database_wrapper
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.44
|
|
4
4
|
Summary: A Different Approach to Database Wrappers in Python
|
|
5
5
|
Author-email: Gints Murans <gm@gm.lv>
|
|
6
6
|
License: GNU General Public License v3.0 (GPL-3.0)
|
|
@@ -46,13 +46,13 @@ Requires-Dist: psycopg[pool] >=3.2.0 ; extra == 'dev'
|
|
|
46
46
|
Requires-Dist: mysqlclient >=2.2.2 ; extra == 'dev'
|
|
47
47
|
Requires-Dist: pymssql >=2.2.10 ; extra == 'dev'
|
|
48
48
|
Provides-Extra: mssql
|
|
49
|
-
Requires-Dist: database-wrapper-mssql ==0.1.
|
|
49
|
+
Requires-Dist: database-wrapper-mssql ==0.1.44 ; extra == 'mssql'
|
|
50
50
|
Provides-Extra: mysql
|
|
51
|
-
Requires-Dist: database-wrapper-mysql ==0.1.
|
|
51
|
+
Requires-Dist: database-wrapper-mysql ==0.1.44 ; extra == 'mysql'
|
|
52
52
|
Provides-Extra: pgsql
|
|
53
|
-
Requires-Dist: database-wrapper-pgsql ==0.1.
|
|
53
|
+
Requires-Dist: database-wrapper-pgsql ==0.1.44 ; extra == 'pgsql'
|
|
54
54
|
Provides-Extra: sqlite
|
|
55
|
-
Requires-Dist: database-wrapper-sqlite ==0.1.
|
|
55
|
+
Requires-Dist: database-wrapper-sqlite ==0.1.44 ; extra == 'sqlite'
|
|
56
56
|
|
|
57
57
|
# database_wrapper
|
|
58
58
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
database_wrapper/__init__.py,sha256=amoShlhRpOhrFbGeKbdq47H5omcVRd4xWG-RUX7bdIk,830
|
|
2
2
|
database_wrapper/common.py,sha256=fsxe28o_4xCrotPbB274dmzQ9rOyes0sBtcHog-9RVc,258
|
|
3
|
-
database_wrapper/config.py,sha256=
|
|
4
|
-
database_wrapper/db_backend.py,sha256=
|
|
5
|
-
database_wrapper/db_data_model.py,sha256=
|
|
3
|
+
database_wrapper/config.py,sha256=hFaefMZ_4XVacDd5n5tPNQVi_fEDbG3ZCB-awE9TPxc,334
|
|
4
|
+
database_wrapper/db_backend.py,sha256=CNfkx-UKVmrR8dSXT5SYpPU3whCL61gxljNVpvcIKXc,5068
|
|
5
|
+
database_wrapper/db_data_model.py,sha256=NV4wfbASIVoSLIXWlHAYxCpVN7-ADKfG6OtYEyTyd_w,12123
|
|
6
6
|
database_wrapper/db_wrapper.py,sha256=O5H7Q8xvvzN4p7KL_NnHflY-EZCfw9TM5mYBzRuJfZA,16488
|
|
7
7
|
database_wrapper/db_wrapper_async.py,sha256=4K-01_UtNxaRgN5qB3j1O2eBX2cOW0xi2ZJJimnqgYw,16714
|
|
8
8
|
database_wrapper/db_wrapper_mixin.py,sha256=-k8Gna_iGE5Gz1gRsVP8sOkUbwX3djjCWeM3ZkGKT7E,10570
|
|
@@ -10,7 +10,7 @@ database_wrapper/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
10
10
|
database_wrapper/utils/__init__.py,sha256=mnewmY38-837VAh4f42hvpMUBVUjOLoMtIfdZBxbkg0,134
|
|
11
11
|
database_wrapper/utils/dataclass_addons.py,sha256=5_ZAj8h-4RtimEM-b9lo6TXi4qYVTf7KIjTtu0jzAS4,762
|
|
12
12
|
database_wrapper/utils/timer.py,sha256=ZJpVMsQ7oHHgyuqMOxVee1fZD78kcDrP4c8gHug3xGU,8927
|
|
13
|
-
database_wrapper-0.1.
|
|
14
|
-
database_wrapper-0.1.
|
|
15
|
-
database_wrapper-0.1.
|
|
16
|
-
database_wrapper-0.1.
|
|
13
|
+
database_wrapper-0.1.44.dist-info/METADATA,sha256=8ceRUd7R_lUMgLpnzdq78fntrH9BUo2Z-PuiAn_WzNg,3370
|
|
14
|
+
database_wrapper-0.1.44.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
15
|
+
database_wrapper-0.1.44.dist-info/top_level.txt,sha256=QcnS4ocJygxcKE5eoOqriuja306oVu-zJRn6yjRRhBw,17
|
|
16
|
+
database_wrapper-0.1.44.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|