tracktolib 0.49.0__tar.gz → 0.49.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tracktolib
3
- Version: 0.49.0
3
+ Version: 0.49.1
4
4
  Summary: Utility library for python
5
5
  Home-page: https://github.com/tracktor/tracktolib
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "tracktolib"
3
- version = "0.49.0"
3
+ version = "0.49.1"
4
4
  description = "Utility library for python"
5
5
  authors = ["Julien Brayere <julien.brayere@tracktor.fr>"]
6
6
  license = "MIT"
@@ -81,7 +81,7 @@ pythonPlatform = "Linux"
81
81
 
82
82
  [tool.commitizen]
83
83
  name = "cz_conventional_commits"
84
- version = "0.49.0"
84
+ version = "0.49.1"
85
85
  tag_format = "$version"
86
86
  version_files = [
87
87
  "pyproject.toml:version"
@@ -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
File without changes
File without changes