psqlpy 0.11.3__tar.gz → 0.11.5__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.
- {psqlpy-0.11.3 → psqlpy-0.11.5}/Cargo.lock +1 -1
- {psqlpy-0.11.3 → psqlpy-0.11.5}/Cargo.toml +2 -1
- psqlpy-0.11.5/PKG-INFO +31 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/__init__.pyi +0 -7
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_value_converter.py +10 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/connection.rs +1 -1
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/connection_pool_builder.rs +3 -3
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/cursor.rs +10 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/transaction.rs +1 -1
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/extra_types.rs +2 -2
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/options.rs +1 -1
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/serde_value.rs +8 -12
- psqlpy-0.11.3/PKG-INFO +0 -110
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/actions/setup_postgres/action.yaml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/pull_request_template.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/workflows/release.yml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/workflows/release_docs.yaml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.github/workflows/test.yaml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.gitignore +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/.pre-commit-config.yaml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/LICENSE +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/README.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/config.ts +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/public/logo.png +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/sidebar.ts +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/styles/config.scss +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/styles/index.scss +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/.vuepress/styles/palette.scss +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/README.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/benchmarks.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/components_overview.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/connection.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/connection_pool.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/connection_pool_builder.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/cursor.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/exceptions.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/listener.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/prepared_statement.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/results.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/components/transaction.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/contribute.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/external_connection_pools.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/faq.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/integrations/opentelemetry.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/integrations/taskiq.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/introduction/components_overview.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/introduction/introduction.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/introduction/lets_start.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/aiohttp.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/blacksheep.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/fastapi.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/frameworks.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/litestar.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/panther.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/frameworks/robyn.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/parameters.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/row_factories/predefined_row_factories.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/row_factories/row_factories.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/advanced_type_usage.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/array_types.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/extra_types.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/supported_types.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/types/types.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/docs/usage/usage.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/examples/aiohttp/start_example.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/examples/fastapi/advanced_example.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/examples/fastapi/start_example.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/package.json +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/pnpm-lock.yaml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/.gitignore +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/.pre-commit-config.yaml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/Dockerfile +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/README.md +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/alembic.ini +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/poetry.lock +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/__init__.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/api/__init__.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/api/piccolo.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/api/plain_queries.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/app.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/helpers.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/lifecycle.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/README +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/env.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/script.py.mako +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/versions/06d989926550_basic_user_table.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/migrations/versions/d162c084f522_big_af_table.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/mocker.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/models/__init__.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/models/piccolo.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/models/sqlalchemy.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/piccolo_conf.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/psqlpy_stress/settings.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/psqlpy-stress/pyproject.toml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/pyproject.toml +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/__init__.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/exceptions.pyi +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/extra_types.pyi +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/_internal/row_factories.pyi +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/exceptions.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/extra_types.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/py.typed +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/psqlpy/row_factories.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/__init__.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/conftest.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/helpers.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_binary_copy.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_connection.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_connection_pool.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_connection_pool_builder.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_cursor.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_data/MTcars.parquet +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_kwargs_parameters.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_listener.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_query_results.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_row_factories.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_ssl_mode.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/python/tests/test_transaction.py +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/common.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/impls.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/structs.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/connection/traits.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/common.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/connection_pool.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/listener/core.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/listener/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/listener/structs.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/prepared_statement.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/driver/utils.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/exceptions/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/exceptions/python_errors.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/exceptions/rust_errors.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/format_helpers.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/lib.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/query_result.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/row_factories.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/runtime.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/cache.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/parameters.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/query.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/statement.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/statement_builder.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/statement/utils.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/transaction/impls.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/transaction/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/transaction/structs.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/additional_types.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/consts.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/converter_impls.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/enums.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/funcs.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/impls.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/dto/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/from_python.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/decimal.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/interval.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/mod.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/models/uuid.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/to_python.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/traits.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/src/value_converter/utils.rs +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/tox.ini +0 -0
- {psqlpy-0.11.3 → psqlpy-0.11.5}/tsconfig.json +0 -0
psqlpy-0.11.5/PKG-INFO
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: psqlpy
|
|
3
|
+
Version: 0.11.5
|
|
4
|
+
Classifier: Typing :: Typed
|
|
5
|
+
Classifier: Topic :: Database
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: Programming Language :: Rust
|
|
8
|
+
Classifier: Programming Language :: Python
|
|
9
|
+
Classifier: Operating System :: MacOS
|
|
10
|
+
Classifier: Operating System :: Microsoft
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Database :: Front-Ends
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Summary: Async PostgreSQL driver for Python written in Rust
|
|
24
|
+
Keywords: postgresql,psql,async-driver,psql-driver,postgresql-driver,python-driver
|
|
25
|
+
Author: Kiselev Aleksandr
|
|
26
|
+
Author-email: askiselev00@gmail.com
|
|
27
|
+
Maintainer-email: Kiselev Aleksandr <askiselev00@gmail.com>
|
|
28
|
+
Requires-Python: >=3.8
|
|
29
|
+
Project-URL: homepage, https://github.com/psqlpy-python/psqlpy
|
|
30
|
+
Project-URL: repository, https://github.com/psqlpy-python/psqlpy
|
|
31
|
+
Project-URL: documentation, https://psqlpy-python.github.io/
|
|
@@ -308,15 +308,8 @@ class Cursor:
|
|
|
308
308
|
"""
|
|
309
309
|
|
|
310
310
|
array_size: int
|
|
311
|
-
cursor_name: str
|
|
312
311
|
querystring: str
|
|
313
312
|
parameters: ParamsT = None
|
|
314
|
-
prepared: bool | None
|
|
315
|
-
conn_dbname: str | None
|
|
316
|
-
user: str | None
|
|
317
|
-
host_addrs: list[str]
|
|
318
|
-
hosts: list[str]
|
|
319
|
-
ports: list[int]
|
|
320
313
|
|
|
321
314
|
def __aiter__(self: Self) -> Self: ...
|
|
322
315
|
async def __anext__(self: Self) -> QueryResult: ...
|
|
@@ -178,6 +178,11 @@ async def test_as_class(
|
|
|
178
178
|
JSONB([{"array": "json"}, {"one more": "test"}]),
|
|
179
179
|
[{"array": "json"}, {"one more": "test"}],
|
|
180
180
|
),
|
|
181
|
+
(
|
|
182
|
+
"JSONB",
|
|
183
|
+
JSONB([1, "1", 1.0]),
|
|
184
|
+
[1, "1", 1.0],
|
|
185
|
+
),
|
|
181
186
|
(
|
|
182
187
|
"JSON",
|
|
183
188
|
{
|
|
@@ -194,6 +199,11 @@ async def test_as_class(
|
|
|
194
199
|
JSON([{"array": "json"}, {"one more": "test"}]),
|
|
195
200
|
[{"array": "json"}, {"one more": "test"}],
|
|
196
201
|
),
|
|
202
|
+
(
|
|
203
|
+
"JSON",
|
|
204
|
+
JSON([1, "1", 1.0]),
|
|
205
|
+
[1, "1", 1.0],
|
|
206
|
+
),
|
|
197
207
|
(
|
|
198
208
|
"MACADDR",
|
|
199
209
|
MacAddr6("08:00:2b:01:02:03"),
|
|
@@ -401,7 +401,7 @@ impl Connection {
|
|
|
401
401
|
/// Create new transaction object.
|
|
402
402
|
///
|
|
403
403
|
/// # Errors
|
|
404
|
-
/// May return Err Result if db_client is None.
|
|
404
|
+
/// May return Err Result if `db_client` is None.
|
|
405
405
|
#[pyo3(signature = (
|
|
406
406
|
isolation_level=None,
|
|
407
407
|
read_variant=None,
|
|
@@ -76,7 +76,7 @@ impl ConnectionPoolBuilder {
|
|
|
76
76
|
))
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/// Set ca_file for ssl_mode in PostgreSQL
|
|
79
|
+
/// Set `ca_file` for `ssl_mode` in `PostgreSQL`.
|
|
80
80
|
fn ca_file(self_: Py<Self>, ca_file: String) -> Py<Self> {
|
|
81
81
|
Python::with_gil(|gil| {
|
|
82
82
|
let mut self_ = self_.borrow_mut(gil);
|
|
@@ -241,7 +241,7 @@ impl ConnectionPoolBuilder {
|
|
|
241
241
|
/// Sets the TCP user timeout.
|
|
242
242
|
///
|
|
243
243
|
/// This is ignored for Unix domain socket connections. It is only supported on systems where
|
|
244
|
-
/// TCP_USER_TIMEOUT is available and will default to the system default if omitted or set to 0;
|
|
244
|
+
/// `TCP_USER_TIMEOUT` is available and will default to the system default if omitted or set to 0;
|
|
245
245
|
/// on other systems, it has no effect.
|
|
246
246
|
#[must_use]
|
|
247
247
|
pub fn tcp_user_timeout(self_: Py<Self>, tcp_user_timeout: u64) -> Py<Self> {
|
|
@@ -314,7 +314,7 @@ impl ConnectionPoolBuilder {
|
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
/// Sets the time interval between TCP keepalive probes.
|
|
317
|
-
/// On Windows, this sets the value of the tcp_keepalive struct’s keepaliveinterval field.
|
|
317
|
+
/// On Windows, this sets the value of the `tcp_keepalive` struct’s keepaliveinterval field.
|
|
318
318
|
///
|
|
319
319
|
/// This is ignored for Unix domain sockets, or if the `keepalives` option is disabled.
|
|
320
320
|
#[must_use]
|
|
@@ -73,6 +73,16 @@ impl Drop for Cursor {
|
|
|
73
73
|
|
|
74
74
|
#[pymethods]
|
|
75
75
|
impl Cursor {
|
|
76
|
+
#[getter]
|
|
77
|
+
fn get_querystring(&self) -> Option<String> {
|
|
78
|
+
self.querystring.clone()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
#[getter]
|
|
82
|
+
fn get_parameters(&self) -> Option<Py<PyAny>> {
|
|
83
|
+
self.parameters.clone()
|
|
84
|
+
}
|
|
85
|
+
|
|
76
86
|
#[getter]
|
|
77
87
|
fn get_array_size(&self) -> i32 {
|
|
78
88
|
self.array_size
|
|
@@ -309,7 +309,7 @@ impl Transaction {
|
|
|
309
309
|
/// Execute many queries in a transaction.
|
|
310
310
|
///
|
|
311
311
|
/// More information in a documentation:
|
|
312
|
-
/// https://psqlpy-python.github.io/components/transaction.html#pipeline
|
|
312
|
+
/// `<https://psqlpy-python.github.io/components/transaction.html#pipeline>`
|
|
313
313
|
///
|
|
314
314
|
/// # Errors
|
|
315
315
|
/// Can return error if there is a problem with DB communication.
|
|
@@ -97,7 +97,7 @@ impl Text {
|
|
|
97
97
|
|
|
98
98
|
#[pymethods]
|
|
99
99
|
impl Text {
|
|
100
|
-
/// Create new PyText from Python str.
|
|
100
|
+
/// Create new `PyText` from Python str.
|
|
101
101
|
#[new]
|
|
102
102
|
#[allow(clippy::missing_errors_doc)]
|
|
103
103
|
#[must_use]
|
|
@@ -121,7 +121,7 @@ impl VarChar {
|
|
|
121
121
|
|
|
122
122
|
#[pymethods]
|
|
123
123
|
impl VarChar {
|
|
124
|
-
/// Create new PyVarChar from Python str.
|
|
124
|
+
/// Create new `PyVarChar` from Python str.
|
|
125
125
|
#[new]
|
|
126
126
|
#[allow(clippy::missing_errors_doc)]
|
|
127
127
|
#[must_use]
|
|
@@ -175,7 +175,7 @@ pub enum SynchronousCommit {
|
|
|
175
175
|
/// As the name indicates, the commit acknowledgment can come before
|
|
176
176
|
/// flushing the records to disk.
|
|
177
177
|
/// This is generally called as an asynchronous commit.
|
|
178
|
-
/// If the PostgreSQL instance crashes,
|
|
178
|
+
/// If the `PostgreSQL` instance crashes,
|
|
179
179
|
/// the last few asynchronous commits might be lost.
|
|
180
180
|
Off,
|
|
181
181
|
/// WAL records are written and flushed to local disks.
|
|
@@ -67,16 +67,12 @@ fn serde_value_from_list(_gil: Python<'_>, bind_value: &Bound<'_, PyAny>) -> PSQ
|
|
|
67
67
|
let mut result_vec: Vec<Value> = Vec::with_capacity(py_list.len());
|
|
68
68
|
|
|
69
69
|
for item in py_list.iter() {
|
|
70
|
-
if item.is_instance_of::<
|
|
71
|
-
let python_dto = from_python_untyped(&item)?;
|
|
72
|
-
result_vec.push(python_dto.to_serde_value()?);
|
|
73
|
-
} else if item.is_instance_of::<PyList>() {
|
|
70
|
+
if item.is_instance_of::<PyList>() {
|
|
74
71
|
let serde_value = build_serde_value(&item)?;
|
|
75
72
|
result_vec.push(serde_value);
|
|
76
73
|
} else {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
));
|
|
74
|
+
let python_dto = from_python_untyped(&item)?;
|
|
75
|
+
result_vec.push(python_dto.to_serde_value()?);
|
|
80
76
|
}
|
|
81
77
|
}
|
|
82
78
|
|
|
@@ -112,17 +108,17 @@ fn serde_value_from_dict(bind_value: &Bound<'_, PyAny>) -> PSQLPyResult<Value> {
|
|
|
112
108
|
/// # Errors
|
|
113
109
|
/// May return error if cannot convert Python type into Rust one.
|
|
114
110
|
#[allow(clippy::needless_pass_by_value)]
|
|
111
|
+
#[allow(clippy::needless_return)]
|
|
115
112
|
pub fn build_serde_value(value: &Bound<'_, PyAny>) -> PSQLPyResult<Value> {
|
|
116
113
|
Python::with_gil(|gil| {
|
|
117
114
|
if value.is_instance_of::<PyList>() {
|
|
118
|
-
serde_value_from_list(gil, value)
|
|
115
|
+
return serde_value_from_list(gil, value);
|
|
119
116
|
} else if value.is_instance_of::<PyDict>() {
|
|
120
117
|
return serde_value_from_dict(value);
|
|
121
|
-
} else {
|
|
122
|
-
return Err(RustPSQLDriverError::PyToRustValueConversionError(
|
|
123
|
-
"PyJSON must be dict value.".to_string(),
|
|
124
|
-
));
|
|
125
118
|
}
|
|
119
|
+
Err(RustPSQLDriverError::PyToRustValueConversionError(
|
|
120
|
+
"PyJSON must be dict or list value.".to_string(),
|
|
121
|
+
))
|
|
126
122
|
})
|
|
127
123
|
}
|
|
128
124
|
|
psqlpy-0.11.3/PKG-INFO
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: psqlpy
|
|
3
|
-
Version: 0.11.3
|
|
4
|
-
Classifier: Typing :: Typed
|
|
5
|
-
Classifier: Topic :: Database
|
|
6
|
-
Classifier: Development Status :: 4 - Beta
|
|
7
|
-
Classifier: Programming Language :: Rust
|
|
8
|
-
Classifier: Programming Language :: Python
|
|
9
|
-
Classifier: Operating System :: MacOS
|
|
10
|
-
Classifier: Operating System :: Microsoft
|
|
11
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Topic :: Database :: Front-Ends
|
|
14
|
-
Classifier: Programming Language :: Python
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
License-File: LICENSE
|
|
23
|
-
Summary: Async PostgreSQL driver for Python written in Rust
|
|
24
|
-
Keywords: postgresql,psql,async-driver,psql-driver,postgresql-driver,python-driver
|
|
25
|
-
Author: Kiselev Aleksandr
|
|
26
|
-
Author-email: askiselev00@gmail.com
|
|
27
|
-
Maintainer-email: Kiselev Aleksandr <askiselev00@gmail.com>
|
|
28
|
-
Requires-Python: >=3.8
|
|
29
|
-
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
30
|
-
Project-URL: homepage, https://github.com/psqlpy-python/psqlpy
|
|
31
|
-
Project-URL: repository, https://github.com/psqlpy-python/psqlpy
|
|
32
|
-
Project-URL: documentation, https://psqlpy-python.github.io/
|
|
33
|
-
|
|
34
|
-
[](https://pypi.org/project/psqlpy/)
|
|
36
|
-
[](https://pypi.org/project/psqlpy/)
|
|
38
|
-
[](https://pypi.org/project/psqlpy/)
|
|
39
|
-
[](https://pypistats.org/packages/psqlpy)
|
|
40
|
-
|
|
41
|
-
# PSQLPy - Async PostgreSQL driver for Python written in Rust.
|
|
42
|
-
|
|
43
|
-
Driver for PostgreSQL written fully in Rust and exposed to Python.
|
|
44
|
-
Main goals of the library is speed and type safety.
|
|
45
|
-
|
|
46
|
-
## Documentation
|
|
47
|
-
You can find full documentation here - [PSQLPy documentation](https://psqlpy-python.github.io/)
|
|
48
|
-
|
|
49
|
-
## Installation
|
|
50
|
-
|
|
51
|
-
You can install package with `pip` or `poetry`.
|
|
52
|
-
|
|
53
|
-
poetry:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
> poetry add psqlpy
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
pip:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
> pip install psqlpy
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
Or you can build it by yourself. To do it, install stable rust and [maturin](https://github.com/PyO3/maturin).
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
> maturin develop --release
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Usage
|
|
72
|
-
|
|
73
|
-
Usage is as easy as possible.
|
|
74
|
-
Create new instance of ConnectionPool and start querying.
|
|
75
|
-
You don't need to startup connection pool, the connection pool will create connections as needed.
|
|
76
|
-
|
|
77
|
-
```python
|
|
78
|
-
from typing import Any
|
|
79
|
-
|
|
80
|
-
from psqlpy import ConnectionPool, QueryResult
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
async def main() -> None:
|
|
84
|
-
db_pool = ConnectionPool(
|
|
85
|
-
username="postgres",
|
|
86
|
-
password="pg_password",
|
|
87
|
-
host="localhost",
|
|
88
|
-
port=5432,
|
|
89
|
-
db_name="postgres",
|
|
90
|
-
max_db_pool_size=2,
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
async with db_pool.acquire() as conn:
|
|
94
|
-
res: QueryResult = await conn.execute(
|
|
95
|
-
"SELECT * FROM users",
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
print(res.result())
|
|
99
|
-
db_pool.close()
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Benchmarks
|
|
104
|
-
|
|
105
|
-
You can find benchmarks with visualization on our [docs](https://psqlpy-python.github.io/benchmarks.html)
|
|
106
|
-
|
|
107
|
-
## Community
|
|
108
|
-
Let's make `PSQLPy` better together!
|
|
109
|
-
Join our community in [Telegram](https://t.me/+f3Y8mYKgXxhmYThi)
|
|
110
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|