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

Method copy_to_table

asyncpg/pool.py:887–938  ·  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

885 )
886
887 async def copy_to_table(
888 self,
889 table_name,
890 *,
891 source,
892 columns=None,
893 schema_name=None,
894 timeout=None,
895 format=None,
896 oids=None,
897 freeze=None,
898 delimiter=None,
899 null=None,
900 header=None,
901 quote=None,
902 escape=None,
903 force_quote=None,
904 force_not_null=None,
905 force_null=None,
906 encoding=None,
907 where=None
908 ):
909 """Copy data to the specified table.
910
911 Pool performs this operation using one of its connections. Other than
912 that, it behaves identically to
913 :meth:`Connection.copy_to_table()
914 <asyncpg.connection.Connection.copy_to_table>`.
915
916 .. versionadded:: 0.24.0
917 """
918 async with self.acquire() as con:
919 return await con.copy_to_table(
920 table_name,
921 source=source,
922 columns=columns,
923 schema_name=schema_name,
924 timeout=timeout,
925 format=format,
926 oids=oids,
927 freeze=freeze,
928 delimiter=delimiter,
929 null=null,
930 header=header,
931 quote=quote,
932 escape=escape,
933 force_quote=force_quote,
934 force_not_null=force_not_null,
935 force_null=force_null,
936 encoding=encoding,
937 where=where
938 )
939
940 async def copy_records_to_table(
941 self,

Calls 1

acquireMethod · 0.95