Copy table contents 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_table() `. .. versionadded::
(
self,
table_name,
*,
output,
columns=None,
schema_name=None,
timeout=None,
format=None,
oids=None,
delimiter=None,
null=None,
header=None,
quote=None,
escape=None,
force_quote=None,
encoding=None
)
| 681 | ) |
| 682 | |
| 683 | async def copy_from_table( |
| 684 | self, |
| 685 | table_name, |
| 686 | *, |
| 687 | output, |
| 688 | columns=None, |
| 689 | schema_name=None, |
| 690 | timeout=None, |
| 691 | format=None, |
| 692 | oids=None, |
| 693 | delimiter=None, |
| 694 | null=None, |
| 695 | header=None, |
| 696 | quote=None, |
| 697 | escape=None, |
| 698 | force_quote=None, |
| 699 | encoding=None |
| 700 | ): |
| 701 | """Copy table contents to a file or file-like object. |
| 702 | |
| 703 | Pool performs this operation using one of its connections. Other than |
| 704 | that, it behaves identically to |
| 705 | :meth:`Connection.copy_from_table() |
| 706 | <asyncpg.connection.Connection.copy_from_table>`. |
| 707 | |
| 708 | .. versionadded:: 0.24.0 |
| 709 | """ |
| 710 | async with self.acquire() as con: |
| 711 | return await con.copy_from_table( |
| 712 | table_name, |
| 713 | output=output, |
| 714 | columns=columns, |
| 715 | schema_name=schema_name, |
| 716 | timeout=timeout, |
| 717 | format=format, |
| 718 | oids=oids, |
| 719 | delimiter=delimiter, |
| 720 | null=null, |
| 721 | header=header, |
| 722 | quote=quote, |
| 723 | escape=escape, |
| 724 | force_quote=force_quote, |
| 725 | encoding=encoding |
| 726 | ) |
| 727 | |
| 728 | async def copy_from_query( |
| 729 | self, |