'takes results from server and converts is to a List (the Rows) of Maps (the columns by name)
'This will convert 30 records of 6 columns in 9 milliseconds on computer - on Lenovo Tablet onlu ONE millisecond
Sub DBResultToListOfMaps(Res As DBResult) As List
Dim ColNames(Res.Columns.Size) As String, X As Int
For Each Col In Res.Columns.Keys
ColNames(X) = Col
X = X + 1
Next
Dim Rows As List, X As Int, Y As Int
Rows.Initialize
For Each Row() As Object In Res.Rows
X = 0
Dim Cols As Map
Cols.Initialize
Y = 0
For Each Fld As Object In Row
Cols.Put(ColNames(Y), Fld)
Y = Y + 1
Next
Rows.Add(Cols)
Next
Log(DateTime.Now)
Log(Rows.Size)
Return Rows
End Sub