@@ -5,7 +5,14 @@ async def test_connection():
55 conn = await asyncpg .connect ()
66
77 try :
8+ # The file-like object is passed in as a keyword-only argument.
9+ # See https://magicstack.github.io/asyncpg/current/api/index.html#asyncpg.connection.Connection.copy_from_query
810 await conn .copy_from_query ("sql" , output = "filepath" ) # $ getSql="sql" getAPathArgument="filepath"
11+ await conn .copy_from_query ("sql" , "arg1" , "arg2" , output = "filepath" ) # $ getSql="sql" getAPathArgument="filepath"
12+
13+ await conn .copy_from_table ("table" , output = "filepath" ) # $ getAPathArgument="filepath"
14+ await conn .copy_to_table ("table" , source = "filepath" ) # $ getAPathArgument="filepath"
15+
916 await conn .execute ("sql" ) # $ getSql="sql"
1017 await conn .executemany ("sql" ) # $ getSql="sql"
1118 await conn .fetch ("sql" ) # $ getSql="sql"
@@ -63,6 +70,10 @@ async def test_connection_pool():
6370
6471 try :
6572 await pool .copy_from_query ("sql" , output = "filepath" ) # $ getSql="sql" getAPathArgument="filepath"
73+ await pool .copy_from_query ("sql" , "arg1" , "arg2" , output = "filepath" ) # $ getSql="sql" getAPathArgument="filepath"
74+ await pool .copy_from_table ("table" , output = "filepath" ) # $ getAPathArgument="filepath"
75+ await pool .copy_to_table ("table" , source = "filepath" ) # $ getAPathArgument="filepath"
76+
6677 await pool .execute ("sql" ) # $ getSql="sql"
6778 await pool .executemany ("sql" ) # $ getSql="sql"
6879 await pool .fetch ("sql" ) # $ getSql="sql"
0 commit comments