MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / MapTableToRows

Function MapTableToRows

engine/row.go:9–19  ·  view source on GitHub ↗

MapTableToRows - transform Table struct into Rows

(table *Table)

Source from the content-addressed store, hash-verified

7
8// MapTableToRows - transform Table struct into Rows
9func 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
21func getRow(table *Table, rowIndex int) map[string]ValueInterface {
22 row := make(map[string]ValueInterface)

Callers 2

getSortedTableMethod · 0.85
getFilteredTableMethod · 0.85

Calls 1

getRowFunction · 0.85

Tested by

no test coverage detected