@@ -16,6 +16,7 @@ class QueryResult:
1616 custom_decoders : dict [str , Callable [[bytes ], Any ]] | None = None ,
1717 ) -> list [dict [Any , Any ]]:
1818 """Return result from database as a list of dicts."""
19+
1920 def as_class (
2021 self : Self ,
2122 as_class : Callable [..., _CustomClass ],
@@ -57,6 +58,7 @@ class SingleQueryResult:
5758
5859 def result (self : Self ) -> dict [Any , Any ]:
5960 """Return result from database as a dict."""
61+
6062 def as_class (
6163 self : Self ,
6264 as_class : Callable [..., _CustomClass ],
@@ -191,11 +193,13 @@ class Cursor:
191193
192194 Execute DECLARE command for the cursor.
193195 """
196+
194197 async def close (self : Self ) -> None :
195198 """Close the cursor.
196199
197200 Execute CLOSE command for the cursor.
198201 """
202+
199203 async def fetch (
200204 self : Self ,
201205 fetch_number : int | None = None ,
@@ -210,6 +214,7 @@ class Cursor:
210214 ### Returns:
211215 result as `QueryResult`.
212216 """
217+
213218 async def fetch_next (
214219 self : Self ,
215220 ) -> QueryResult :
@@ -220,6 +225,7 @@ class Cursor:
220225 ### Returns:
221226 result as `QueryResult`.
222227 """
228+
223229 async def fetch_prior (
224230 self : Self ,
225231 ) -> QueryResult :
@@ -230,6 +236,7 @@ class Cursor:
230236 ### Returns:
231237 result as `QueryResult`.
232238 """
239+
233240 async def fetch_first (
234241 self : Self ,
235242 ) -> QueryResult :
@@ -240,6 +247,7 @@ class Cursor:
240247 ### Returns:
241248 result as `QueryResult`.
242249 """
250+
243251 async def fetch_last (
244252 self : Self ,
245253 ) -> QueryResult :
@@ -250,6 +258,7 @@ class Cursor:
250258 ### Returns:
251259 result as `QueryResult`.
252260 """
261+
253262 async def fetch_absolute (
254263 self : Self ,
255264 absolute_number : int ,
@@ -261,6 +270,7 @@ class Cursor:
261270 ### Returns:
262271 result as `QueryResult`.
263272 """
273+
264274 async def fetch_relative (
265275 self : Self ,
266276 relative_number : int ,
@@ -272,6 +282,7 @@ class Cursor:
272282 ### Returns:
273283 result as `QueryResult`.
274284 """
285+
275286 async def fetch_forward_all (
276287 self : Self ,
277288 ) -> QueryResult :
@@ -282,6 +293,7 @@ class Cursor:
282293 ### Returns:
283294 result as `QueryResult`.
284295 """
296+
285297 async def fetch_backward (
286298 self : Self ,
287299 backward_count : int ,
@@ -293,6 +305,7 @@ class Cursor:
293305 ### Returns:
294306 result as `QueryResult`.
295307 """
308+
296309 async def fetch_backward_all (
297310 self : Self ,
298311 ) -> QueryResult :
@@ -327,13 +340,15 @@ class Transaction:
327340
328341 `begin()` can be called only once per transaction.
329342 """
343+
330344 async def commit (self : Self ) -> None :
331345 """Commit the transaction.
332346
333347 Execute `COMMIT`.
334348
335349 `commit()` can be called only once per transaction.
336350 """
351+
337352 async def execute (
338353 self : Self ,
339354 querystring : str ,
@@ -372,6 +387,7 @@ class Transaction:
372387 await transaction.commit()
373388 ```
374389 """
390+
375391 async def execute_many (
376392 self : Self ,
377393 querystring : str ,
@@ -430,6 +446,7 @@ class Transaction:
430446 - `prepared`: should the querystring be prepared before the request.
431447 By default any querystring will be prepared.
432448 """
449+
433450 async def fetch_row (
434451 self : Self ,
435452 querystring : str ,
@@ -470,6 +487,7 @@ class Transaction:
470487 await transaction.commit()
471488 ```
472489 """
490+
473491 async def fetch_val (
474492 self : Self ,
475493 querystring : str ,
@@ -511,6 +529,7 @@ class Transaction:
511529 )
512530 ```
513531 """
532+
514533 async def pipeline (
515534 self ,
516535 queries : list [tuple [str , list [Any ] | None ]],
@@ -577,6 +596,7 @@ class Transaction:
577596
578597 ```
579598 """
599+
580600 async def create_savepoint (self : Self , savepoint_name : str ) -> None :
581601 """Create new savepoint.
582602
@@ -606,6 +626,7 @@ class Transaction:
606626 await transaction.rollback_savepoint("my_savepoint")
607627 ```
608628 """
629+
609630 async def rollback (self : Self ) -> None :
610631 """Rollback all queries in the transaction.
611632
@@ -627,6 +648,7 @@ class Transaction:
627648 await transaction.rollback()
628649 ```
629650 """
651+
630652 async def rollback_savepoint (self : Self , savepoint_name : str ) -> None :
631653 """ROLLBACK to the specified `savepoint_name`.
632654
@@ -653,6 +675,7 @@ class Transaction:
653675 await transaction.rollback_savepoint("my_savepoint")
654676 ```
655677 """
678+
656679 async def release_savepoint (self : Self , savepoint_name : str ) -> None :
657680 """Execute ROLLBACK TO SAVEPOINT.
658681
@@ -678,6 +701,7 @@ class Transaction:
678701 await transaction.release_savepoint
679702 ```
680703 """
704+
681705 def cursor (
682706 self : Self ,
683707 querystring : str ,
@@ -771,6 +795,7 @@ class Connection:
771795 dict_result: List[Dict[Any, Any]] = query_result.result()
772796 ```
773797 """
798+
774799 async def execute_many (
775800 self : Self ,
776801 querystring : str ,
@@ -824,6 +849,7 @@ class Connection:
824849 - `prepared`: should the querystring be prepared before the request.
825850 By default any querystring will be prepared.
826851 """
852+
827853 async def fetch_row (
828854 self : Self ,
829855 querystring : str ,
@@ -861,6 +887,7 @@ class Connection:
861887 dict_result: Dict[Any, Any] = query_result.result()
862888 ```
863889 """
890+
864891 async def fetch_val (
865892 self : Self ,
866893 querystring : str ,
@@ -901,6 +928,7 @@ class Connection:
901928 )
902929 ```
903930 """
931+
904932 def transaction (
905933 self ,
906934 isolation_level : IsolationLevel | None = None ,
@@ -1016,6 +1044,7 @@ class ConnectionPool:
10161044 - `max_db_pool_size`: maximum size of the connection pool.
10171045 - `conn_recycling_method`: how a connection is recycled.
10181046 """
1047+
10191048 async def execute (
10201049 self : Self ,
10211050 querystring : str ,
@@ -1051,6 +1080,7 @@ class ConnectionPool:
10511080 # it will be dropped on Rust side.
10521081 ```
10531082 """
1083+
10541084 async def fetch (
10551085 self : Self ,
10561086 querystring : str ,
@@ -1071,11 +1101,13 @@ class ConnectionPool:
10711101 - `prepared`: should the querystring be prepared before the request.
10721102 By default any querystring will be prepared.
10731103 """
1104+
10741105 async def connection (self : Self ) -> Connection :
10751106 """Create new connection.
10761107
10771108 It acquires new connection from the database pool.
10781109 """
1110+
10791111 def close (self : Self ) -> None :
10801112 """Close the connection pool."""
10811113
0 commit comments