You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,18 @@ DBInterface.execute(stmt, (col1=1, col2=3.14)) # execute the prepared INSERT sta
38
38
39
39
DBInterface.executemany(stmt, (col1=[1,2,3,4,5], col2=[3.14, 1.23, 2.343.45, 4.56])) # execute the prepared statement multiple times for each set of named parameters; each named parameter must be an indexable collection
40
40
41
+
results = DBInterface.executemultiple(conn, sql) # where sql is a query that returns multiple resultsets
42
+
43
+
# first iterate through resultsets
44
+
for result in results
45
+
# for each resultset, we can iterate through resultset rows
46
+
for row in result
47
+
@showpropertynames(row)
48
+
row.col1
49
+
row[1]
50
+
end
51
+
end
52
+
41
53
DBInterface.close!(stmt) # close the prepared statement
Some databases allow returning multiple resultsets from a "single" query (typically semi-colon (`;`) separated statements, or from calling stored procedures).
128
+
This function takes the exact same arguments as `DBInterface.execute`, but instead of returning a single `Cursor`, it returns an iterator of `Cursor`s.
129
+
This function defines a generic fallback that just returns `(DBInterface.execute(stmt, params),)`, a length-1 tuple for a single `Cursor` resultset.
0 commit comments