(cols []*model.ColumnInfo, writeBrackets bool)
| 255 | } |
| 256 | |
| 257 | func (b *SQLBuilder) writeColNames(cols []*model.ColumnInfo, writeBrackets bool) { |
| 258 | if writeBrackets { |
| 259 | b.restoreCtx.WritePlain("(") |
| 260 | } |
| 261 | |
| 262 | first := true |
| 263 | for _, col := range cols { |
| 264 | if first { |
| 265 | first = false |
| 266 | } else { |
| 267 | b.restoreCtx.WritePlain(", ") |
| 268 | } |
| 269 | b.writeColName(col) |
| 270 | } |
| 271 | |
| 272 | if writeBrackets { |
| 273 | b.restoreCtx.WritePlain(")") |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | func (b *SQLBuilder) writeDataPoint(cols []*model.ColumnInfo, dp []types.Datum) error { |
| 278 | writeBrackets := len(cols) > 1 |
no test coverage detected