MCPcopy
hub / github.com/MagicStack/asyncpg / copy_to_table

Method copy_to_table

asyncpg/pool.py:770–821  ·  view source on GitHub ↗

Copy data to the specified table. Pool performs this operation using one of its connections. Other than that, it behaves identically to :meth:`Connection.copy_to_table() `. .. versionadded:: 0.24.0

(
        self,
        table_name,
        *,
        source,
        columns=None,
        schema_name=None,
        timeout=None,
        format=None,
        oids=None,
        freeze=None,
        delimiter=None,
        null=None,
        header=None,
        quote=None,
        escape=None,
        force_quote=None,
        force_not_null=None,
        force_null=None,
        encoding=None,
        where=None
    )

Source from the content-addressed store, hash-verified

768 )
769
770 async def copy_to_table(
771 self,
772 table_name,
773 *,
774 source,
775 columns=None,
776 schema_name=None,
777 timeout=None,
778 format=None,
779 oids=None,
780 freeze=None,
781 delimiter=None,
782 null=None,
783 header=None,
784 quote=None,
785 escape=None,
786 force_quote=None,
787 force_not_null=None,
788 force_null=None,
789 encoding=None,
790 where=None
791 ):
792 """Copy data to the specified table.
793
794 Pool performs this operation using one of its connections. Other than
795 that, it behaves identically to
796 :meth:`Connection.copy_to_table()
797 <asyncpg.connection.Connection.copy_to_table>`.
798
799 .. versionadded:: 0.24.0
800 """
801 async with self.acquire() as con:
802 return await con.copy_to_table(
803 table_name,
804 source=source,
805 columns=columns,
806 schema_name=schema_name,
807 timeout=timeout,
808 format=format,
809 oids=oids,
810 freeze=freeze,
811 delimiter=delimiter,
812 null=null,
813 header=header,
814 quote=quote,
815 escape=escape,
816 force_quote=force_quote,
817 force_not_null=force_not_null,
818 force_null=force_null,
819 encoding=encoding,
820 where=where
821 )
822
823 async def copy_records_to_table(
824 self,

Calls 1

acquireMethod · 0.95