tracktolib 0.49.0__py3-none-any.whl → 0.49.1__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.
- tracktolib/pg_sync.py +3 -1
- {tracktolib-0.49.0.dist-info → tracktolib-0.49.1.dist-info}/METADATA +1 -1
- {tracktolib-0.49.0.dist-info → tracktolib-0.49.1.dist-info}/RECORD +5 -5
- {tracktolib-0.49.0.dist-info → tracktolib-0.49.1.dist-info}/LICENSE +0 -0
- {tracktolib-0.49.0.dist-info → tracktolib-0.49.1.dist-info}/WHEEL +0 -0
tracktolib/pg_sync.py
CHANGED
|
@@ -18,6 +18,7 @@ from .pg_utils import get_tmp_table_query
|
|
|
18
18
|
def fetch_all(engine: Connection, query: LiteralString, *data) -> list[dict]:
|
|
19
19
|
with engine.cursor(row_factory=dict_row) as cur:
|
|
20
20
|
resp = (cur.execute(query) if not data else cur.execute(query, data)).fetchall()
|
|
21
|
+
engine.commit()
|
|
21
22
|
return resp
|
|
22
23
|
|
|
23
24
|
|
|
@@ -27,7 +28,7 @@ def fetch_count(engine: Connection, table: str, *args, where: str | None = None)
|
|
|
27
28
|
query = f"{query} WHERE {where}"
|
|
28
29
|
with engine.cursor() as cur:
|
|
29
30
|
count = cur.execute(cast(LiteralString, query), params=args).fetchone()
|
|
30
|
-
|
|
31
|
+
engine.commit()
|
|
31
32
|
return count[0] if count else None
|
|
32
33
|
|
|
33
34
|
|
|
@@ -46,6 +47,7 @@ def fetch_one(engine: Connection, query: Query, *args) -> dict | None: ...
|
|
|
46
47
|
def fetch_one(engine: Connection, query: Query, *args, required: bool = False) -> dict | None:
|
|
47
48
|
with engine.cursor(row_factory=dict_row) as cur:
|
|
48
49
|
_data = cur.execute(query, args).fetchone()
|
|
50
|
+
engine.commit()
|
|
49
51
|
if required and not _data:
|
|
50
52
|
raise ValueError("No value found for query")
|
|
51
53
|
return _data
|
|
@@ -6,14 +6,14 @@ tracktolib/logs.py,sha256=M5RZ8OYKgLEBJeC1AwUCSRbFAH09hwdTjjs-AQ9QGg8,2204
|
|
|
6
6
|
tracktolib/pg/__init__.py,sha256=32kKBJzIDyppszZMAOSMgM3ggz7Ow0TaNKiMs740gyw,333
|
|
7
7
|
tracktolib/pg/query.py,sha256=KESY4g0XePUrRIakygmzhPP2vIOfJGWc2PAZsIj_PfI,13580
|
|
8
8
|
tracktolib/pg/utils.py,sha256=cL24KEt4SWJQ7LJPzaO3c8Xg0ZLmjhn22DtTWg86nwc,6324
|
|
9
|
-
tracktolib/pg_sync.py,sha256=
|
|
9
|
+
tracktolib/pg_sync.py,sha256=z6EB0hELq6t129gnVnX0rNXv2McZXxI8khy-TEG65Ag,5165
|
|
10
10
|
tracktolib/pg_utils.py,sha256=8DDlZVSgfNie9M-zL7wilFufXMMvSPw5d7aIDs_pQCM,1976
|
|
11
11
|
tracktolib/s3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
tracktolib/s3/minio.py,sha256=wMEjkSes9Fp39fD17IctALpD6zB2xwDRQEmO7Vzan3g,1387
|
|
13
13
|
tracktolib/s3/s3.py,sha256=d0Q63Zb62ef4jAt05zQwpgYvAoxHC9kSQuHzzK90VvE,4825
|
|
14
14
|
tracktolib/tests.py,sha256=Pbc4yGQrIWFLBEgX-kDBxhMCqH-bfOJtkH2agvaM6ZQ,382
|
|
15
15
|
tracktolib/utils.py,sha256=jwLww8bqDu8zEip9uN4yW0lE5_YMWfrAHYtagr8sYOA,5295
|
|
16
|
-
tracktolib-0.49.
|
|
17
|
-
tracktolib-0.49.
|
|
18
|
-
tracktolib-0.49.
|
|
19
|
-
tracktolib-0.49.
|
|
16
|
+
tracktolib-0.49.1.dist-info/LICENSE,sha256=uUanH0X7SeZEPdsRTHegMSMTiIHMurt9H0jSwEwKE1Y,1081
|
|
17
|
+
tracktolib-0.49.1.dist-info/METADATA,sha256=_HBMlEoVz25S6viwoubRgSxNhZjG51Madd4d3A0F-XA,3641
|
|
18
|
+
tracktolib-0.49.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
19
|
+
tracktolib-0.49.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|