@@ -423,6 +423,7 @@ async def copy_from_table(self, table_name, *, output,
423
423
... 'mytable', columns=('foo', 'bar'),
424
424
... output='file.csv', format='csv')
425
425
... print(result)
426
+ ...
426
427
>>> asyncio.get_event_loop().run_until_complete(run())
427
428
'COPY 100'
428
429
@@ -491,6 +492,7 @@ async def copy_from_query(self, query, *args, output,
491
492
... 'SELECT foo, bar FROM mytable WHERE foo > $1', 10,
492
493
... output='file.csv', format='csv')
493
494
... print(result)
495
+ ...
494
496
>>> asyncio.get_event_loop().run_until_complete(run())
495
497
'COPY 10'
496
498
@@ -556,7 +558,8 @@ async def copy_to_table(self, table_name, *, source,
556
558
... con = await asyncpg.connect(user='postgres')
557
559
... result = await con.copy_to_table(
558
560
... 'mytable', source='datafile.tbl')
559
- .... print(result)
561
+ ... print(result)
562
+ ...
560
563
>>> asyncio.get_event_loop().run_until_complete(run())
561
564
'COPY 140000'
562
565
@@ -621,7 +624,8 @@ async def copy_records_to_table(self, table_name, *, records,
621
624
... 'mytable', records=[
622
625
... (1, 'foo', 'bar'),
623
626
... (2, 'ham', 'spam')])
624
- .... print(result)
627
+ ... print(result)
628
+ ...
625
629
>>> asyncio.get_event_loop().run_until_complete(run())
626
630
'COPY 2'
627
631
@@ -861,6 +865,7 @@ async def set_type_codec(self, typename, *,
861
865
... "SELECT '2 years 3 mons 1 day'::interval")
862
866
... print(result)
863
867
... print(datetime.datetime(2002, 1, 1) + result)
868
+ ...
864
869
>>> asyncio.get_event_loop().run_until_complete(run())
865
870
relativedelta(years=+2, months=+3, days=+1)
866
871
2004-04-02 00:00:00
@@ -1399,6 +1404,7 @@ class of the returned connection object. Must be a subclass of
1399
1404
... con = await asyncpg.connect(user='postgres')
1400
1405
... types = await con.fetch('SELECT * FROM pg_type')
1401
1406
... print(types)
1407
+ ...
1402
1408
>>> asyncio.get_event_loop().run_until_complete(run())
1403
1409
[<Record typname='bool' typnamespace=11 ...
1404
1410
0 commit comments