14 lines
234 B
Go
Executable file
14 lines
234 B
Go
Executable file
package main
|
|
|
|
func ToTable[T DatabaseType](rows []T, columns TableColumns) Table {
|
|
tableRows := make([]TableRow, len(rows))
|
|
|
|
for i, dT := range rows {
|
|
tableRows[i] = dT.ToTableRow()
|
|
}
|
|
|
|
return Table{
|
|
columns,
|
|
tableRows,
|
|
}
|
|
}
|