Copy the results of a query to a file or file-like object. Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.copy_from_query() `. .. version
(
self,
query,
*args,
output,
timeout=None,
format=None,
oids=None,
delimiter=None,
null=None,
header=None,
quote=None,
escape=None,
force_quote=None,
encoding=None
)
| 726 | ) |
| 727 | |
| 728 | async def copy_from_query( |
| 729 | self, |
| 730 | query, |
| 731 | *args, |
| 732 | output, |
| 733 | timeout=None, |
| 734 | format=None, |
| 735 | oids=None, |
| 736 | delimiter=None, |
| 737 | null=None, |
| 738 | header=None, |
| 739 | quote=None, |
| 740 | escape=None, |
| 741 | force_quote=None, |
| 742 | encoding=None |
| 743 | ): |
| 744 | """Copy the results of a query to a file or file-like object. |
| 745 | |
| 746 | Pool performs this operation using one of its connections. Other than |
| 747 | that, it behaves identically to |
| 748 | :meth:`Connection.copy_from_query() |
| 749 | <asyncpg.connection.Connection.copy_from_query>`. |
| 750 | |
| 751 | .. versionadded:: 0.24.0 |
| 752 | """ |
| 753 | async with self.acquire() as con: |
| 754 | return await con.copy_from_query( |
| 755 | query, |
| 756 | *args, |
| 757 | output=output, |
| 758 | timeout=timeout, |
| 759 | format=format, |
| 760 | oids=oids, |
| 761 | delimiter=delimiter, |
| 762 | null=null, |
| 763 | header=header, |
| 764 | quote=quote, |
| 765 | escape=escape, |
| 766 | force_quote=force_quote, |
| 767 | encoding=encoding |
| 768 | ) |
| 769 | |
| 770 | async def copy_to_table( |
| 771 | self, |