database-wrapper 0.1.37__py3-none-any.whl → 0.1.38__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_wrapper_mixin.py +23 -1
- {database_wrapper-0.1.37.dist-info → database_wrapper-0.1.38.dist-info}/METADATA +5 -5
- {database_wrapper-0.1.37.dist-info → database_wrapper-0.1.38.dist-info}/RECORD +6 -6
- {database_wrapper-0.1.37.dist-info → database_wrapper-0.1.38.dist-info}/WHEEL +1 -1
- {database_wrapper-0.1.37.dist-info → database_wrapper-0.1.38.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": "11.11.2024 22:
|
|
8
|
-
"app_version": "0.1.
|
|
6
|
+
"git_commit_hash": "5160789e2c4bdb5815a162e04dca5392b820c3f5",
|
|
7
|
+
"git_commit_date": "11.11.2024 22:26",
|
|
8
|
+
"app_version": "0.1.38",
|
|
9
9
|
}
|
|
@@ -43,7 +43,7 @@ class DBWrapperMixin:
|
|
|
43
43
|
# Meta methods
|
|
44
44
|
def __init__(
|
|
45
45
|
self,
|
|
46
|
-
db:
|
|
46
|
+
db: Any = None,
|
|
47
47
|
dbConn: Any = None,
|
|
48
48
|
logger: logging.Logger | None = None,
|
|
49
49
|
):
|
|
@@ -76,6 +76,28 @@ class DBWrapperMixin:
|
|
|
76
76
|
if hasattr(self, "dbConn") and self.dbConn:
|
|
77
77
|
del self.dbConn
|
|
78
78
|
|
|
79
|
+
###############
|
|
80
|
+
### Setters ###
|
|
81
|
+
###############
|
|
82
|
+
|
|
83
|
+
def updateDb(self, db: Any) -> None:
|
|
84
|
+
"""
|
|
85
|
+
Updates the database backend object.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
db (DatabaseBackend): The new database backend object.
|
|
89
|
+
"""
|
|
90
|
+
self.db = db
|
|
91
|
+
|
|
92
|
+
def updateDbConn(self, dbConn: Any) -> None:
|
|
93
|
+
"""
|
|
94
|
+
Updates the database connection object.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
dbConn (Any): The new database connection object.
|
|
98
|
+
"""
|
|
99
|
+
self.dbConn = dbConn
|
|
100
|
+
|
|
79
101
|
######################
|
|
80
102
|
### Helper methods ###
|
|
81
103
|
######################
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: database_wrapper
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.38
|
|
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.38 ; extra == 'mssql'
|
|
50
50
|
Provides-Extra: mysql
|
|
51
|
-
Requires-Dist: database-wrapper-mysql ==0.1.
|
|
51
|
+
Requires-Dist: database-wrapper-mysql ==0.1.38 ; extra == 'mysql'
|
|
52
52
|
Provides-Extra: pgsql
|
|
53
|
-
Requires-Dist: database-wrapper-pgsql ==0.1.
|
|
53
|
+
Requires-Dist: database-wrapper-pgsql ==0.1.38 ; extra == 'pgsql'
|
|
54
54
|
Provides-Extra: sqlite
|
|
55
|
-
Requires-Dist: database-wrapper-sqlite ==0.1.
|
|
55
|
+
Requires-Dist: database-wrapper-sqlite ==0.1.38 ; extra == 'sqlite'
|
|
56
56
|
|
|
57
57
|
# database_wrapper
|
|
58
58
|
|
|
@@ -1,16 +1,16 @@
|
|
|
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=
|
|
3
|
+
database_wrapper/config.py,sha256=kr7_uBZI8cqfjahVUuClewOKJgeCF-ys6A-68hDXcoQ,334
|
|
4
4
|
database_wrapper/db_backend.py,sha256=iQd1yVsLumutfoOmWY-XAAiLg00_I-IueOv_RtO_7ew,5068
|
|
5
5
|
database_wrapper/db_data_model.py,sha256=njef4LR7XQcTdob961t1DQ7q3i2dzfVrFyuAtD3YYwQ,12181
|
|
6
6
|
database_wrapper/db_wrapper.py,sha256=9RuixREftA52pL24qYBJSmaZ2_4a9dDSUS4MUhPSrlE,17874
|
|
7
7
|
database_wrapper/db_wrapper_async.py,sha256=0fFqrV8fbFOaloXOg1qQVu_xA3RRJVrrJ6rQWti1aek,18318
|
|
8
|
-
database_wrapper/db_wrapper_mixin.py,sha256=
|
|
8
|
+
database_wrapper/db_wrapper_mixin.py,sha256=hWI-t7cJr_0jfsLNcm6sY-FDsJbe9gyN1DOcwRX2LLc,10485
|
|
9
9
|
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.38.dist-info/METADATA,sha256=7tJjSlK3g81yKphZzBLgvHh11BSBZCLXHvoAoLO79Ok,3370
|
|
14
|
+
database_wrapper-0.1.38.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
15
|
+
database_wrapper-0.1.38.dist-info/top_level.txt,sha256=QcnS4ocJygxcKE5eoOqriuja306oVu-zJRn6yjRRhBw,17
|
|
16
|
+
database_wrapper-0.1.38.dist-info/RECORD,,
|
|
File without changes
|