@@ -5,7 +5,14 @@ async def test_connection():
5
5
conn = await asyncpg .connect ()
6
6
7
7
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
8
10
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
+
9
16
await conn .execute ("sql" ) # $ getSql="sql"
10
17
await conn .executemany ("sql" ) # $ getSql="sql"
11
18
await conn .fetch ("sql" ) # $ getSql="sql"
@@ -63,6 +70,10 @@ async def test_connection_pool():
63
70
64
71
try :
65
72
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
+
66
77
await pool .execute ("sql" ) # $ getSql="sql"
67
78
await pool .executemany ("sql" ) # $ getSql="sql"
68
79
await pool .fetch ("sql" ) # $ getSql="sql"
0 commit comments