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
)
| 843 | ) |
| 844 | |
| 845 | async def copy_from_query( |
| 846 | self, |
| 847 | query, |
| 848 | *args, |
| 849 | output, |
| 850 | timeout=None, |
| 851 | format=None, |
| 852 | oids=None, |
| 853 | delimiter=None, |
| 854 | null=None, |
| 855 | header=None, |
| 856 | quote=None, |
| 857 | escape=None, |
| 858 | force_quote=None, |
| 859 | encoding=None |
| 860 | ): |
| 861 | """Copy the results of a query to a file or file-like object. |
| 862 | |
| 863 | Pool performs this operation using one of its connections. Other than |
| 864 | that, it behaves identically to |
| 865 | :meth:`Connection.copy_from_query() |
| 866 | <asyncpg.connection.Connection.copy_from_query>`. |
| 867 | |
| 868 | .. versionadded:: 0.24.0 |
| 869 | """ |
| 870 | async with self.acquire() as con: |
| 871 | return await con.copy_from_query( |
| 872 | query, |
| 873 | *args, |
| 874 | output=output, |
| 875 | timeout=timeout, |
| 876 | format=format, |
| 877 | oids=oids, |
| 878 | delimiter=delimiter, |
| 879 | null=null, |
| 880 | header=header, |
| 881 | quote=quote, |
| 882 | escape=escape, |
| 883 | force_quote=force_quote, |
| 884 | encoding=encoding |
| 885 | ) |
| 886 | |
| 887 | async def copy_to_table( |
| 888 | self, |