@@ -75,7 +75,7 @@ python3 -m pip install iso8601
75
75
- Асинхронный
76
76
77
77
``` python
78
- async with ydb.aio.QuerySessionPoolAsync (driver) as pool:
78
+ async with ydb.aio.QuerySessionPool (driver) as pool:
79
79
pass # operations with pool here
80
80
```
81
81
@@ -153,7 +153,7 @@ python3 -m pip install iso8601
153
153
- Асинхронный
154
154
155
155
``` python
156
- async def create_tables (pool : ydb.aio.QuerySessionPoolAsync ):
156
+ async def create_tables (pool : ydb.aio.QuerySessionPool ):
157
157
print (" \n Creating table series..." )
158
158
await pool.execute_with_retries(
159
159
"""
@@ -219,7 +219,7 @@ python3 -m pip install iso8601
219
219
- Асинхронный
220
220
221
221
``` python
222
- async def upsert_simple (pool : ydb.aio.QuerySessionPoolAsync ):
222
+ async def upsert_simple (pool : ydb.aio.QuerySessionPool ):
223
223
print (" \n Performing UPSERT into episodes..." )
224
224
await pool.execute_with_retries(
225
225
"""
@@ -267,7 +267,7 @@ python3 -m pip install iso8601
267
267
- Асинхронный
268
268
269
269
``` python
270
- async def select_simple (pool : ydb.aio.QuerySessionPoolAsync ):
270
+ async def select_simple (pool : ydb.aio.QuerySessionPool ):
271
271
print (" \n Check series table..." )
272
272
result_sets = await pool.execute_with_retries(
273
273
"""
@@ -365,7 +365,7 @@ series, Id: 1, title: IT Crowd, Release date: 2006-02-03
365
365
- Асинхронный
366
366
367
367
``` python
368
- async def select_with_parameters (pool : ydb.aio.QuerySessionPoolAsync , series_id , season_id , episode_id ):
368
+ async def select_with_parameters (pool : ydb.aio.QuerySessionPool , series_id , season_id , episode_id ):
369
369
result_sets = await pool.execute_with_retries(
370
370
"""
371
371
DECLARE $seriesId AS Int64;
@@ -443,7 +443,7 @@ series, Id: 1, title: IT Crowd, Release date: 2006-02-03
443
443
444
444
``` python
445
445
def explicit_transaction_control (pool : ydb.QuerySessionPool, series_id , season_id , episode_id ):
446
- def callee (session : ydb.QuerySessionSync ):
446
+ def callee (session : ydb.QuerySession ):
447
447
query = """
448
448
DECLARE $seriesId AS Int64;
449
449
DECLARE $seasonId AS Int64;
@@ -481,9 +481,9 @@ series, Id: 1, title: IT Crowd, Release date: 2006-02-03
481
481
482
482
``` python
483
483
async def explicit_transaction_control (
484
- pool : ydb.aio.QuerySessionPoolAsync , series_id , season_id , episode_id
484
+ pool : ydb.aio.QuerySessionPool , series_id , season_id , episode_id
485
485
):
486
- async def callee (session : ydb.aio.QuerySessionAsync ):
486
+ async def callee (session : ydb.aio.QuerySession ):
487
487
query = """
488
488
DECLARE $seriesId AS Int64;
489
489
DECLARE $seasonId AS Int64;
@@ -534,7 +534,7 @@ series, Id: 1, title: IT Crowd, Release date: 2006-02-03
534
534
535
535
``` python
536
536
def huge_select (pool : ydb.QuerySessionPool):
537
- def callee (session : ydb.QuerySessionSync ):
537
+ def callee (session : ydb.QuerySession ):
538
538
query = """ SELECT * from episodes;"""
539
539
540
540
with session.transaction(ydb.QuerySnapshotReadOnly()).execute(
@@ -552,8 +552,8 @@ series, Id: 1, title: IT Crowd, Release date: 2006-02-03
552
552
- Асинхронный
553
553
554
554
``` python
555
- async def huge_select (pool : ydb.aio.QuerySessionPoolAsync ):
556
- async def callee (session : ydb.aio.QuerySessionAsync ):
555
+ async def huge_select (pool : ydb.aio.QuerySessionPool ):
556
+ async def callee (session : ydb.aio.QuerySession ):
557
557
query = """ SELECT * from episodes;"""
558
558
559
559
async with await session.transaction(ydb.QuerySnapshotReadOnly()).execute(
0 commit comments