MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / copy_from_table

Method copy_from_table

asyncpg/pool.py:800–843  ·  view source on GitHub ↗

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
    )

Source from the content-addressed store, hash-verified

798 )
799
800 async def copy_from_table(
801 self,
802 table_name,
803 *,
804 output,
805 columns=None,
806 schema_name=None,
807 timeout=None,
808 format=None,
809 oids=None,
810 delimiter=None,
811 null=None,
812 header=None,
813 quote=None,
814 escape=None,
815 force_quote=None,
816 encoding=None
817 ):
818 """Copy table contents to a file or file-like object.
819
820 Pool performs this operation using one of its connections. Other than
821 that, it behaves identically to
822 :meth:`Connection.copy_from_table()
823 <asyncpg.connection.Connection.copy_from_table>`.
824
825 .. versionadded:: 0.24.0
826 """
827 async with self.acquire() as con:
828 return await con.copy_from_table(
829 table_name,
830 output=output,
831 columns=columns,
832 schema_name=schema_name,
833 timeout=timeout,
834 format=format,
835 oids=oids,
836 delimiter=delimiter,
837 null=null,
838 header=header,
839 quote=quote,
840 escape=escape,
841 force_quote=force_quote,
842 encoding=encoding
843 )
844
845 async def copy_from_query(
846 self,

Calls 1

acquireMethod · 0.95

Tested by 2