@@ -437,6 +437,8 @@ class Transaction:
437437 ) -> Any | None :
438438 """Execute the query and return first value of the first row.
439439
440+ Returns an error if the query does not return exactly one row.
441+
440442 Querystring can contain `$<number>` parameters
441443 for converting them in the driver side.
442444
@@ -446,6 +448,10 @@ class Transaction:
446448 - `prepared`: should the querystring be prepared before the request.
447449 By default any querystring will be prepared.
448450
451+ ### Raises
452+ - `RustPSQLDriverPyBaseError`: if the query does not
453+ return exactly one row
454+
449455 ### Example:
450456 ```python
451457 import asyncio
@@ -799,9 +805,11 @@ class Connection:
799805 querystring : str ,
800806 parameters : list [Any ] | None = None ,
801807 prepared : bool = True ,
802- ) -> Any | None :
808+ ) -> Any :
803809 """Execute the query and return first value of the first row.
804810
811+ Returns an error if the query does not return exactly one row.
812+
805813 Querystring can contain `$<number>` parameters
806814 for converting them in the driver side.
807815
@@ -811,6 +819,10 @@ class Connection:
811819 - `prepared`: should the querystring be prepared before the request.
812820 By default any querystring will be prepared.
813821
822+ ### Raises
823+ - `RustPSQLDriverPyBaseError`: if the query does not
824+ return exactly one row
825+
814826 ### Example:
815827 ```python
816828 import asyncio
@@ -928,27 +940,3 @@ class PSQLPool:
928940
929941 It acquires new connection from the database pool.
930942 """
931-
932- def create_connection_pool (
933- dsn : Optional [str ] = None ,
934- username : Optional [str ] = None ,
935- password : Optional [str ] = None ,
936- host : Optional [str ] = None ,
937- port : Optional [int ] = None ,
938- db_name : Optional [str ] = None ,
939- max_db_pool_size : int = 2 ,
940- conn_recycling_method : Optional [ConnRecyclingMethod ] = None ,
941- ) -> PSQLPool :
942- """Create new connection pool.
943-
944- ### Parameters:
945- - `dsn`: full dsn connection string.
946- `postgres://postgres:postgres@localhost:5432/postgres?target_session_attrs=read-write`
947- - `username`: username of the user in postgres
948- - `password`: password of the user in postgres
949- - `host`: host of postgres
950- - `port`: port of postgres
951- - `db_name`: name of the database in postgres
952- - `max_db_pool_size`: maximum size of the connection pool
953- - `conn_recycling_method`: how a connection is recycled.
954- """
0 commit comments