(formatter *Formatter)
| 2582 | } |
| 2583 | |
| 2584 | func (a *TableIndex) FormatSQL(formatter *Formatter) { |
| 2585 | formatter.WriteString("INDEX") |
| 2586 | formatter.WriteByte(whitespace) |
| 2587 | formatter.WriteExpr(a.Name) |
| 2588 | // Add space only if column expression doesn't start with '(' |
| 2589 | columnExprStr := Format(a.ColumnExpr) |
| 2590 | if len(columnExprStr) > 0 && columnExprStr[0] != '(' { |
| 2591 | formatter.WriteByte(whitespace) |
| 2592 | } |
| 2593 | formatter.WriteString(columnExprStr) |
| 2594 | formatter.WriteByte(whitespace) |
| 2595 | formatter.WriteString("TYPE") |
| 2596 | formatter.WriteByte(whitespace) |
| 2597 | formatter.WriteExpr(a.ColumnType) |
| 2598 | formatter.WriteByte(whitespace) |
| 2599 | formatter.WriteString("GRANULARITY") |
| 2600 | formatter.WriteByte(whitespace) |
| 2601 | formatter.WriteExpr(a.Granularity) |
| 2602 | } |
| 2603 | |
| 2604 | func (t *TableProjection) FormatSQL(formatter *Formatter) { |
| 2605 | if t.IncludeProjectionKeyword { |
nothing calls this directly
no test coverage detected