Append rows to the table
(row ...Row)
| 12 | |
| 13 | // Append rows to the table |
| 14 | func (t *DataTable) Append(row ...Row) { |
| 15 | for _, r := range row { |
| 16 | if r == nil { |
| 17 | continue |
| 18 | } |
| 19 | for _, col := range t.cols { |
| 20 | if !col.IsComputed() { |
| 21 | if cell, ok := r[col.Name()]; ok { |
| 22 | col.serie.Append(cell) |
| 23 | continue |
| 24 | } |
| 25 | } |
| 26 | col.serie.Grow(1) |
| 27 | } |
| 28 | t.nrows++ |
| 29 | } |
| 30 | t.dirty = true |
| 31 | } |
| 32 | |
| 33 | // AppendRow creates a new row and append cells to this row |
| 34 | func (t *DataTable) AppendRow(v ...interface{}) error { |
nothing calls this directly
no test coverage detected