/** * This function returns a struct having all the lowercased columns as keys and their corresponding values * v0.9 by Henry Ho * v1.0 by Adam Cameron (re-write in script) * * @param query The query from which to extract the row data (Required) * @param row The row to extract. Defaults to currentRow (Optional) * @return Returns a struct containing the data from the selected row * @author Henry Ho (henryho167@gmail.com) * @version 1, June 21, 2014 */ public struct function queryGetRow(required query query, numeric row){ if (!structKeyExists(arguments, "row")){ row = query.currentRow; } var struct = {}; for (var col in listToArray(query.columnList)){ struct[lcase(col)] = query[col][row]; } return struct; }