(w expr.DialectWriter)
| 562 | } |
| 563 | |
| 564 | func (m *Columns) WriteDialect(w expr.DialectWriter) { |
| 565 | colCt := len(*m) |
| 566 | if colCt == 1 { |
| 567 | (*m)[0].WriteDialect(w) |
| 568 | return |
| 569 | } else if colCt == 0 { |
| 570 | return |
| 571 | } |
| 572 | for i, col := range *m { |
| 573 | if i != 0 { |
| 574 | io.WriteString(w, ", ") |
| 575 | } |
| 576 | col.WriteDialect(w) |
| 577 | } |
| 578 | } |
| 579 | func (m *Columns) String() string { |
| 580 | w := expr.NewDefaultWriter() |
| 581 | m.WriteDialect(w) |