psqlpy 0.11.0__tar.gz → 0.11.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.

Potentially problematic release.


This version of psqlpy might be problematic. Click here for more details.

Files changed (164) hide show
  1. {psqlpy-0.11.0 → psqlpy-0.11.1}/Cargo.lock +1 -1
  2. {psqlpy-0.11.0 → psqlpy-0.11.1}/Cargo.toml +1 -1
  3. {psqlpy-0.11.0 → psqlpy-0.11.1}/PKG-INFO +3 -1
  4. {psqlpy-0.11.0 → psqlpy-0.11.1}/README.md +2 -0
  5. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/common.rs +2 -2
  6. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/cursor.rs +4 -4
  7. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/prepared_statement.rs +1 -1
  8. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/transaction.rs +13 -13
  9. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/exceptions/rust_errors.rs +3 -3
  10. {psqlpy-0.11.0 → psqlpy-0.11.1}/.github/actions/setup_postgres/action.yaml +0 -0
  11. {psqlpy-0.11.0 → psqlpy-0.11.1}/.github/pull_request_template.md +0 -0
  12. {psqlpy-0.11.0 → psqlpy-0.11.1}/.github/workflows/release.yml +0 -0
  13. {psqlpy-0.11.0 → psqlpy-0.11.1}/.github/workflows/release_docs.yaml +0 -0
  14. {psqlpy-0.11.0 → psqlpy-0.11.1}/.github/workflows/test.yaml +0 -0
  15. {psqlpy-0.11.0 → psqlpy-0.11.1}/.gitignore +0 -0
  16. {psqlpy-0.11.0 → psqlpy-0.11.1}/.pre-commit-config.yaml +0 -0
  17. {psqlpy-0.11.0 → psqlpy-0.11.1}/LICENSE +0 -0
  18. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/.vuepress/config.ts +0 -0
  19. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/.vuepress/public/logo.png +0 -0
  20. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/.vuepress/sidebar.ts +0 -0
  21. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/.vuepress/styles/config.scss +0 -0
  22. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/.vuepress/styles/index.scss +0 -0
  23. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/.vuepress/styles/palette.scss +0 -0
  24. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/README.md +0 -0
  25. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/benchmarks.md +0 -0
  26. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/components_overview.md +0 -0
  27. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/connection.md +0 -0
  28. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/connection_pool.md +0 -0
  29. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/connection_pool_builder.md +0 -0
  30. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/cursor.md +0 -0
  31. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/exceptions.md +0 -0
  32. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/listener.md +0 -0
  33. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/prepared_statement.md +0 -0
  34. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/results.md +0 -0
  35. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/components/transaction.md +0 -0
  36. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/contribute.md +0 -0
  37. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/external_connection_pools.md +0 -0
  38. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/faq.md +0 -0
  39. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/integrations/opentelemetry.md +0 -0
  40. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/integrations/taskiq.md +0 -0
  41. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/introduction/components_overview.md +0 -0
  42. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/introduction/introduction.md +0 -0
  43. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/introduction/lets_start.md +0 -0
  44. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/frameworks/aiohttp.md +0 -0
  45. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/frameworks/blacksheep.md +0 -0
  46. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/frameworks/fastapi.md +0 -0
  47. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/frameworks/frameworks.md +0 -0
  48. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/frameworks/litestar.md +0 -0
  49. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/frameworks/robyn.md +0 -0
  50. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/parameters.md +0 -0
  51. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/row_factories/predefined_row_factories.md +0 -0
  52. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/row_factories/row_factories.md +0 -0
  53. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/types/advanced_type_usage.md +0 -0
  54. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/types/array_types.md +0 -0
  55. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/types/extra_types.md +0 -0
  56. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/types/supported_types.md +0 -0
  57. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/types/types.md +0 -0
  58. {psqlpy-0.11.0 → psqlpy-0.11.1}/docs/usage/usage.md +0 -0
  59. {psqlpy-0.11.0 → psqlpy-0.11.1}/examples/aiohttp/start_example.py +0 -0
  60. {psqlpy-0.11.0 → psqlpy-0.11.1}/examples/fastapi/advanced_example.py +0 -0
  61. {psqlpy-0.11.0 → psqlpy-0.11.1}/examples/fastapi/start_example.py +0 -0
  62. {psqlpy-0.11.0 → psqlpy-0.11.1}/package.json +0 -0
  63. {psqlpy-0.11.0 → psqlpy-0.11.1}/pnpm-lock.yaml +0 -0
  64. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/.gitignore +0 -0
  65. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/.pre-commit-config.yaml +0 -0
  66. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/Dockerfile +0 -0
  67. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/README.md +0 -0
  68. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/alembic.ini +0 -0
  69. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/poetry.lock +0 -0
  70. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/__init__.py +0 -0
  71. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/api/__init__.py +0 -0
  72. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/api/piccolo.py +0 -0
  73. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/api/plain_queries.py +0 -0
  74. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/app.py +0 -0
  75. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/helpers.py +0 -0
  76. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/lifecycle.py +0 -0
  77. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/migrations/README +0 -0
  78. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/migrations/env.py +0 -0
  79. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/migrations/script.py.mako +0 -0
  80. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/migrations/versions/06d989926550_basic_user_table.py +0 -0
  81. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/migrations/versions/d162c084f522_big_af_table.py +0 -0
  82. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/mocker.py +0 -0
  83. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/models/__init__.py +0 -0
  84. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/models/piccolo.py +0 -0
  85. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/models/sqlalchemy.py +0 -0
  86. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/piccolo_conf.py +0 -0
  87. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/psqlpy_stress/settings.py +0 -0
  88. {psqlpy-0.11.0 → psqlpy-0.11.1}/psqlpy-stress/pyproject.toml +0 -0
  89. {psqlpy-0.11.0 → psqlpy-0.11.1}/pyproject.toml +0 -0
  90. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/__init__.py +0 -0
  91. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/_internal/__init__.pyi +0 -0
  92. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/_internal/exceptions.pyi +0 -0
  93. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/_internal/extra_types.pyi +0 -0
  94. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/_internal/row_factories.pyi +0 -0
  95. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/exceptions.py +0 -0
  96. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/extra_types.py +0 -0
  97. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/py.typed +0 -0
  98. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/psqlpy/row_factories.py +0 -0
  99. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/__init__.py +0 -0
  100. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/conftest.py +0 -0
  101. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/helpers.py +0 -0
  102. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_binary_copy.py +0 -0
  103. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_connection.py +0 -0
  104. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_connection_pool.py +0 -0
  105. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_connection_pool_builder.py +0 -0
  106. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_cursor.py +0 -0
  107. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_data/MTcars.parquet +0 -0
  108. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_kwargs_parameters.py +0 -0
  109. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_listener.py +0 -0
  110. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_row_factories.py +0 -0
  111. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_ssl_mode.py +0 -0
  112. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_transaction.py +0 -0
  113. {psqlpy-0.11.0 → psqlpy-0.11.1}/python/tests/test_value_converter.py +0 -0
  114. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/common.rs +0 -0
  115. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/connection/impls.rs +0 -0
  116. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/connection/mod.rs +0 -0
  117. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/connection/structs.rs +0 -0
  118. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/connection/traits.rs +0 -0
  119. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/connection.rs +0 -0
  120. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/connection_pool.rs +0 -0
  121. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/connection_pool_builder.rs +0 -0
  122. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/listener/core.rs +0 -0
  123. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/listener/mod.rs +0 -0
  124. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/listener/structs.rs +0 -0
  125. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/mod.rs +0 -0
  126. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/driver/utils.rs +0 -0
  127. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/exceptions/mod.rs +0 -0
  128. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/exceptions/python_errors.rs +0 -0
  129. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/extra_types.rs +0 -0
  130. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/format_helpers.rs +0 -0
  131. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/lib.rs +0 -0
  132. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/options.rs +0 -0
  133. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/query_result.rs +0 -0
  134. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/row_factories.rs +0 -0
  135. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/runtime.rs +0 -0
  136. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/cache.rs +0 -0
  137. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/mod.rs +0 -0
  138. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/parameters.rs +0 -0
  139. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/query.rs +0 -0
  140. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/statement.rs +0 -0
  141. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/statement_builder.rs +0 -0
  142. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/statement/utils.rs +0 -0
  143. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/transaction/impls.rs +0 -0
  144. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/transaction/mod.rs +0 -0
  145. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/transaction/structs.rs +0 -0
  146. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/additional_types.rs +0 -0
  147. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/consts.rs +0 -0
  148. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/dto/converter_impls.rs +0 -0
  149. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/dto/enums.rs +0 -0
  150. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/dto/funcs.rs +0 -0
  151. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/dto/impls.rs +0 -0
  152. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/dto/mod.rs +0 -0
  153. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/from_python.rs +0 -0
  154. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/mod.rs +0 -0
  155. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/models/decimal.rs +0 -0
  156. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/models/interval.rs +0 -0
  157. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/models/mod.rs +0 -0
  158. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/models/serde_value.rs +0 -0
  159. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/models/uuid.rs +0 -0
  160. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/to_python.rs +0 -0
  161. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/traits.rs +0 -0
  162. {psqlpy-0.11.0 → psqlpy-0.11.1}/src/value_converter/utils.rs +0 -0
  163. {psqlpy-0.11.0 → psqlpy-0.11.1}/tox.ini +0 -0
  164. {psqlpy-0.11.0 → psqlpy-0.11.1}/tsconfig.json +0 -0
@@ -1006,7 +1006,7 @@ dependencies = [
1006
1006
 
1007
1007
  [[package]]
1008
1008
  name = "psqlpy"
1009
- version = "0.11.0"
1009
+ version = "0.11.1"
1010
1010
  dependencies = [
1011
1011
  "byteorder",
1012
1012
  "bytes",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "psqlpy"
3
- version = "0.11.0"
3
+ version = "0.11.1"
4
4
  edition = "2021"
5
5
 
6
6
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: psqlpy
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Classifier: Typing :: Typed
5
5
  Classifier: Topic :: Database
6
6
  Classifier: Development Status :: 4 - Beta
@@ -33,6 +33,8 @@ Project-URL: documentation, https://psqlpy-python.github.io/
33
33
 
34
34
  [![PyPI - Python Version](https://img.shields.io/badge/PYTHON-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?style=for-the-badge
35
35
  )](https://pypi.org/project/psqlpy/)
36
+ [![PyPI - Python Version](https://img.shields.io/badge/Tested%20On%20PostgreSQL-14%20%7C%2015%20%7C%2016%20%7C17-2be28a?style=for-the-badge
37
+ )](https://pypi.org/project/psqlpy/)
36
38
  [![PyPI](https://img.shields.io/pypi/v/psqlpy?style=for-the-badge)](https://pypi.org/project/psqlpy/)
37
39
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/psqlpy?style=for-the-badge)](https://pypistats.org/packages/psqlpy)
38
40
 
@@ -1,5 +1,7 @@
1
1
  [![PyPI - Python Version](https://img.shields.io/badge/PYTHON-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue?style=for-the-badge
2
2
  )](https://pypi.org/project/psqlpy/)
3
+ [![PyPI - Python Version](https://img.shields.io/badge/Tested%20On%20PostgreSQL-14%20%7C%2015%20%7C%2016%20%7C17-2be28a?style=for-the-badge
4
+ )](https://pypi.org/project/psqlpy/)
3
5
  [![PyPI](https://img.shields.io/pypi/v/psqlpy?style=for-the-badge)](https://pypi.org/project/psqlpy/)
4
6
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/psqlpy?style=for-the-badge)](https://pypistats.org/packages/psqlpy)
5
7
 
@@ -194,7 +194,7 @@ macro_rules! impl_transaction_methods {
194
194
  pub async fn commit(&mut self) -> PSQLPyResult<()> {
195
195
  let conn = self.conn.clone();
196
196
  let Some(conn) = conn else {
197
- return Err(RustPSQLDriverError::TransactionClosedError("1".into()));
197
+ return Err(RustPSQLDriverError::TransactionClosedError);
198
198
  };
199
199
  let mut write_conn_g = conn.write().await;
200
200
  write_conn_g.commit().await?;
@@ -209,7 +209,7 @@ macro_rules! impl_transaction_methods {
209
209
  pub async fn rollback(&mut self) -> PSQLPyResult<()> {
210
210
  let conn = self.conn.clone();
211
211
  let Some(conn) = conn else {
212
- return Err(RustPSQLDriverError::TransactionClosedError("2".into()));
212
+ return Err(RustPSQLDriverError::TransactionClosedError);
213
213
  };
214
214
  let mut write_conn_g = conn.write().await;
215
215
  write_conn_g.rollback().await?;
@@ -54,10 +54,10 @@ impl Cursor {
54
54
 
55
55
  async fn query_portal(&self, size: i32) -> PSQLPyResult<PSQLDriverPyQueryResult> {
56
56
  let Some(transaction) = &self.transaction else {
57
- return Err(RustPSQLDriverError::TransactionClosedError("3".into()));
57
+ return Err(RustPSQLDriverError::TransactionClosedError);
58
58
  };
59
59
  let Some(portal) = &self.inner else {
60
- return Err(RustPSQLDriverError::TransactionClosedError("4".into()));
60
+ return Err(RustPSQLDriverError::TransactionClosedError);
61
61
  };
62
62
  transaction.query_portal(&portal, size).await
63
63
  }
@@ -162,10 +162,10 @@ impl Cursor {
162
162
  let py_future = Python::with_gil(move |gil| {
163
163
  rustdriver_future(gil, async move {
164
164
  let Some(txid) = &txid else {
165
- return Err(RustPSQLDriverError::TransactionClosedError("5".into()));
165
+ return Err(RustPSQLDriverError::TransactionClosedError);
166
166
  };
167
167
  let Some(portal) = &portal else {
168
- return Err(RustPSQLDriverError::TransactionClosedError("6".into()));
168
+ return Err(RustPSQLDriverError::TransactionClosedError);
169
169
  };
170
170
  let result = txid.query_portal(&portal, size).await?;
171
171
 
@@ -39,7 +39,7 @@ impl PreparedStatement {
39
39
  impl PreparedStatement {
40
40
  async fn execute(&self) -> PSQLPyResult<PSQLDriverPyQueryResult> {
41
41
  let Some(conn) = &self.conn else {
42
- return Err(RustPSQLDriverError::TransactionClosedError("12".into()));
42
+ return Err(RustPSQLDriverError::TransactionClosedError);
43
43
  };
44
44
 
45
45
  let read_conn_g = conn.read().await;
@@ -71,7 +71,7 @@ impl Transaction {
71
71
  });
72
72
 
73
73
  let Some(conn) = conn else {
74
- return Err(RustPSQLDriverError::TransactionClosedError("7".into()));
74
+ return Err(RustPSQLDriverError::TransactionClosedError);
75
75
  };
76
76
  let mut write_conn_g = conn.write().await;
77
77
  write_conn_g
@@ -98,7 +98,7 @@ impl Transaction {
98
98
  });
99
99
 
100
100
  let Some(conn) = conn else {
101
- return Err(RustPSQLDriverError::TransactionClosedError("8".into()));
101
+ return Err(RustPSQLDriverError::TransactionClosedError);
102
102
  };
103
103
  let mut write_conn_g = conn.write().await;
104
104
  if is_exception_none {
@@ -121,7 +121,7 @@ impl Transaction {
121
121
  pub async fn begin(&mut self) -> PSQLPyResult<()> {
122
122
  let conn = &self.conn;
123
123
  let Some(conn) = conn else {
124
- return Err(RustPSQLDriverError::TransactionClosedError("9".into()));
124
+ return Err(RustPSQLDriverError::TransactionClosedError);
125
125
  };
126
126
  let mut write_conn_g = conn.write().await;
127
127
  write_conn_g
@@ -139,7 +139,7 @@ impl Transaction {
139
139
  prepared: Option<bool>,
140
140
  ) -> PSQLPyResult<PSQLDriverPyQueryResult> {
141
141
  let Some(conn) = &self.conn else {
142
- return Err(RustPSQLDriverError::TransactionClosedError("10".into()));
142
+ return Err(RustPSQLDriverError::TransactionClosedError);
143
143
  };
144
144
 
145
145
  let read_conn_g = conn.read().await;
@@ -154,7 +154,7 @@ impl Transaction {
154
154
  prepared: Option<bool>,
155
155
  ) -> PSQLPyResult<PSQLDriverPyQueryResult> {
156
156
  let Some(conn) = &self.conn else {
157
- return Err(RustPSQLDriverError::TransactionClosedError("11".into()));
157
+ return Err(RustPSQLDriverError::TransactionClosedError);
158
158
  };
159
159
 
160
160
  let read_conn_g = conn.read().await;
@@ -169,7 +169,7 @@ impl Transaction {
169
169
  prepared: Option<bool>,
170
170
  ) -> PSQLPyResult<Py<PyAny>> {
171
171
  let Some(conn) = &self.conn else {
172
- return Err(RustPSQLDriverError::TransactionClosedError("12".into()));
172
+ return Err(RustPSQLDriverError::TransactionClosedError);
173
173
  };
174
174
 
175
175
  let read_conn_g = conn.read().await;
@@ -180,7 +180,7 @@ impl Transaction {
180
180
 
181
181
  pub async fn execute_batch(&self, querystring: String) -> PSQLPyResult<()> {
182
182
  let Some(conn) = &self.conn else {
183
- return Err(RustPSQLDriverError::TransactionClosedError("13".into()));
183
+ return Err(RustPSQLDriverError::TransactionClosedError);
184
184
  };
185
185
 
186
186
  let read_conn_g = conn.read().await;
@@ -195,7 +195,7 @@ impl Transaction {
195
195
  prepared: Option<bool>,
196
196
  ) -> PSQLPyResult<()> {
197
197
  let Some(conn) = &self.conn else {
198
- return Err(RustPSQLDriverError::TransactionClosedError("14".into()));
198
+ return Err(RustPSQLDriverError::TransactionClosedError);
199
199
  };
200
200
 
201
201
  let read_conn_g = conn.read().await;
@@ -212,7 +212,7 @@ impl Transaction {
212
212
  prepared: Option<bool>,
213
213
  ) -> PSQLPyResult<PSQLDriverSinglePyQueryResult> {
214
214
  let Some(conn) = &self.conn else {
215
- return Err(RustPSQLDriverError::TransactionClosedError("15".into()));
215
+ return Err(RustPSQLDriverError::TransactionClosedError);
216
216
  };
217
217
 
218
218
  let read_conn_g = conn.read().await;
@@ -223,7 +223,7 @@ impl Transaction {
223
223
 
224
224
  pub async fn create_savepoint(&mut self, savepoint_name: String) -> PSQLPyResult<()> {
225
225
  let Some(conn) = &self.conn else {
226
- return Err(RustPSQLDriverError::TransactionClosedError("16".into()));
226
+ return Err(RustPSQLDriverError::TransactionClosedError);
227
227
  };
228
228
 
229
229
  let read_conn_g = conn.read().await;
@@ -236,7 +236,7 @@ impl Transaction {
236
236
 
237
237
  pub async fn release_savepoint(&mut self, savepoint_name: String) -> PSQLPyResult<()> {
238
238
  let Some(conn) = &self.conn else {
239
- return Err(RustPSQLDriverError::TransactionClosedError("17".into()));
239
+ return Err(RustPSQLDriverError::TransactionClosedError);
240
240
  };
241
241
 
242
242
  let read_conn_g = conn.read().await;
@@ -249,7 +249,7 @@ impl Transaction {
249
249
 
250
250
  pub async fn rollback_savepoint(&mut self, savepoint_name: String) -> PSQLPyResult<()> {
251
251
  let Some(conn) = &self.conn else {
252
- return Err(RustPSQLDriverError::TransactionClosedError("18".into()));
252
+ return Err(RustPSQLDriverError::TransactionClosedError);
253
253
  };
254
254
 
255
255
  let read_conn_g = conn.read().await;
@@ -305,6 +305,6 @@ impl Transaction {
305
305
  return future::try_join_all(futures).await;
306
306
  }
307
307
 
308
- Err(RustPSQLDriverError::TransactionClosedError("19".into()))
308
+ Err(RustPSQLDriverError::TransactionClosedError)
309
309
  }
310
310
  }
@@ -49,8 +49,8 @@ pub enum RustPSQLDriverError {
49
49
  TransactionSavepointError(String),
50
50
  #[error("Transaction execute error: {0}")]
51
51
  TransactionExecuteError(String),
52
- #[error("Underlying connection is returned to the pool: {0}")]
53
- TransactionClosedError(String),
52
+ #[error("Underlying connection is returned to the pool")]
53
+ TransactionClosedError,
54
54
 
55
55
  // Cursor Errors
56
56
  #[error("Cursor error: {0}")]
@@ -162,7 +162,7 @@ impl From<RustPSQLDriverError> for pyo3::PyErr {
162
162
  RustPSQLDriverError::TransactionExecuteError(_) => {
163
163
  TransactionExecuteError::new_err((error_desc,))
164
164
  }
165
- RustPSQLDriverError::TransactionClosedError(_) => {
165
+ RustPSQLDriverError::TransactionClosedError => {
166
166
  TransactionClosedError::new_err((error_desc,))
167
167
  }
168
168
  RustPSQLDriverError::BaseCursorError(_) => BaseCursorError::new_err((error_desc,)),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes