database-wrapper-pgsql 0.2.26__tar.gz → 0.2.30__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.
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/PKG-INFO +2 -2
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/connector.py +5 -1
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/db_wrapper_pgsql_mixin.py +8 -2
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql.egg-info/PKG-INFO +2 -2
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql.egg-info/requires.txt +1 -1
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/pyproject.toml +2 -2
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/README.md +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/__init__.py +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/db_wrapper_pgsql.py +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/db_wrapper_pgsql_async.py +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/pg_introspector.py +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/py.typed +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/type_mapping.py +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql.egg-info/SOURCES.txt +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql.egg-info/dependency_links.txt +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql.egg-info/top_level.txt +0 -0
- {database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: database_wrapper_pgsql
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.30
|
|
4
4
|
Summary: database_wrapper for PostgreSQL database
|
|
5
5
|
Author-email: Gints Murans <gm@gm.lv>
|
|
6
6
|
License: GNU General Public License v3.0 (GPL-3.0)
|
|
@@ -32,7 +32,7 @@ Classifier: Topic :: Software Development
|
|
|
32
32
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
33
33
|
Requires-Python: >=3.8
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
|
-
Requires-Dist: database_wrapper==0.2.
|
|
35
|
+
Requires-Dist: database_wrapper==0.2.30
|
|
36
36
|
Requires-Dist: psycopg[binary]>=3.2.0
|
|
37
37
|
Requires-Dist: psycopg[pool]>=3.2.0
|
|
38
38
|
|
{database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/connector.py
RENAMED
|
@@ -123,6 +123,7 @@ class Pgsql(DatabaseBackend):
|
|
|
123
123
|
if db_conn:
|
|
124
124
|
with db_conn.transaction() as trans:
|
|
125
125
|
yield trans
|
|
126
|
+
return
|
|
126
127
|
|
|
127
128
|
assert self.connection, "Connection is not initialized"
|
|
128
129
|
with self.connection.transaction() as trans:
|
|
@@ -261,6 +262,7 @@ class PgsqlAsync(DatabaseBackend):
|
|
|
261
262
|
if db_conn:
|
|
262
263
|
async with db_conn.transaction() as trans:
|
|
263
264
|
yield trans
|
|
265
|
+
return
|
|
264
266
|
|
|
265
267
|
assert self.connection, "Connection is not initialized"
|
|
266
268
|
async with self.connection.transaction() as trans:
|
|
@@ -522,6 +524,7 @@ class PgsqlWithPooling(DatabaseBackend):
|
|
|
522
524
|
if db_conn:
|
|
523
525
|
with db_conn.transaction() as trans:
|
|
524
526
|
yield trans
|
|
527
|
+
return
|
|
525
528
|
|
|
526
529
|
assert self.connection, "Connection is not initialized"
|
|
527
530
|
with self.connection.transaction() as trans:
|
|
@@ -684,7 +687,7 @@ class PgsqlWithPoolingAsync(DatabaseBackend):
|
|
|
684
687
|
# Close async pool
|
|
685
688
|
self.logger.debug("Closing connection pool")
|
|
686
689
|
await self.close()
|
|
687
|
-
if hasattr(self, "
|
|
690
|
+
if hasattr(self, "pool_async") and self.pool_async.closed is False:
|
|
688
691
|
await self.pool_async.close()
|
|
689
692
|
|
|
690
693
|
async def open(self) -> None:
|
|
@@ -806,6 +809,7 @@ class PgsqlWithPoolingAsync(DatabaseBackend):
|
|
|
806
809
|
if db_conn:
|
|
807
810
|
async with db_conn.transaction() as trans:
|
|
808
811
|
yield trans
|
|
812
|
+
return
|
|
809
813
|
|
|
810
814
|
assert self.connection, "Connection is not initialized"
|
|
811
815
|
async with self.connection.transaction() as trans:
|
|
@@ -70,8 +70,14 @@ class DBWrapperPgsqlMixin:
|
|
|
70
70
|
if order_by is None:
|
|
71
71
|
return None
|
|
72
72
|
|
|
73
|
-
order_list = [
|
|
74
|
-
|
|
73
|
+
order_list = [
|
|
74
|
+
sql.SQL("{} {}").format(
|
|
75
|
+
sql.Identifier(item[0]),
|
|
76
|
+
sql.SQL(item[1] if len(item) > 1 and item[1] is not None else "ASC"),
|
|
77
|
+
)
|
|
78
|
+
for item in order_by
|
|
79
|
+
]
|
|
80
|
+
return sql.SQL("ORDER BY ") + sql.SQL(", ").join(order_list)
|
|
75
81
|
|
|
76
82
|
def limit_query(
|
|
77
83
|
self,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: database_wrapper_pgsql
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.30
|
|
4
4
|
Summary: database_wrapper for PostgreSQL database
|
|
5
5
|
Author-email: Gints Murans <gm@gm.lv>
|
|
6
6
|
License: GNU General Public License v3.0 (GPL-3.0)
|
|
@@ -32,7 +32,7 @@ Classifier: Topic :: Software Development
|
|
|
32
32
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
33
33
|
Requires-Python: >=3.8
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
|
-
Requires-Dist: database_wrapper==0.2.
|
|
35
|
+
Requires-Dist: database_wrapper==0.2.30
|
|
36
36
|
Requires-Dist: psycopg[binary]>=3.2.0
|
|
37
37
|
Requires-Dist: psycopg[pool]>=3.2.0
|
|
38
38
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "database_wrapper_pgsql"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.30"
|
|
8
8
|
description = "database_wrapper for PostgreSQL database"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -33,7 +33,7 @@ classifiers = [
|
|
|
33
33
|
]
|
|
34
34
|
keywords = ["database", "wrapper", "python", "postgresql", "pgsql"]
|
|
35
35
|
dependencies = [
|
|
36
|
-
"database_wrapper == 0.2.
|
|
36
|
+
"database_wrapper == 0.2.30",
|
|
37
37
|
"psycopg[binary] >= 3.2.0",
|
|
38
38
|
"psycopg[pool] >= 3.2.0",
|
|
39
39
|
]
|
|
File without changes
|
{database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{database_wrapper_pgsql-0.2.26 → database_wrapper_pgsql-0.2.30}/database_wrapper_pgsql/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|