We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 80a5210 + 5a6b9b4 commit dd67ff5Copy full SHA for dd67ff5
Sources/MySQL/Connection.swift
@@ -132,12 +132,14 @@ public final class Connection {
132
133
var results: [[String: Node]] = []
134
135
+ // This single dictionary is reused for all rows in the result set
136
+ // to avoid the runtime overhead of (de)allocating one per row.
137
+ var parsed: [String: Node] = [:]
138
+
139
// Iterate over all of the rows that are returned.
140
// `mysql_stmt_fetch` will continue to return `0`
141
// as long as there are rows to be fetched.
142
while mysql_stmt_fetch(statement) == 0 {
- var parsed: [String: Node] = [:]
-
143
// For each row, loop over all of the fields expected.
144
for (i, field) in fields.fields.enumerated() {
145
0 commit comments