MapTableToRows - transform Table struct into Rows
(table *Table)
| 7 | |
| 8 | // MapTableToRows - transform Table struct into Rows |
| 9 | func MapTableToRows(table *Table) Rows { |
| 10 | rows := make([]map[string]ValueInterface, 0) |
| 11 | |
| 12 | numberOfRows := len(table.Columns[0].Values) |
| 13 | |
| 14 | for rowIndex := 0; rowIndex < numberOfRows; rowIndex++ { |
| 15 | row := getRow(table, rowIndex) |
| 16 | rows = append(rows, row) |
| 17 | } |
| 18 | return Rows{rows: rows} |
| 19 | } |
| 20 | |
| 21 | func getRow(table *Table, rowIndex int) map[string]ValueInterface { |
| 22 | row := make(map[string]ValueInterface) |
no test coverage detected