Get column names so we can do something link the following with results:
let results = mysqlStatement.results()
let fieldNames = mysqlStatement.fieldNames()
var arrayResults: [[String:Any]] = []
results.forEachRow { row in
var rowDictionary = [String: Any]()
var i = 0
while i != results.numFields {
rowDictionary[fieldNames[i]!] = row[i]!
i += 1
}
arrayResults.append(rowDictionary)
}
Get column names so we can do something link the following with results: