ColumnName returns the column name if this is a simple column reference. For functional indexes or expressions, it returns the string representation. FIXME: parser.String(ic.columnExpr) is not actually a correct column name.
()
| 289 | // For functional indexes or expressions, it returns the string representation. |
| 290 | // FIXME: parser.String(ic.columnExpr) is not actually a correct column name. |
| 291 | func (ic IndexColumn) ColumnName() string { |
| 292 | // Check if it's a simple column reference (ColName) |
| 293 | if colName, ok := ic.columnExpr.(*parser.ColName); ok { |
| 294 | return colName.Name.Name |
| 295 | } |
| 296 | // For expressions, return the full expression string |
| 297 | return parser.String(ic.columnExpr) |
| 298 | } |
| 299 | |
| 300 | // IndexColumn.direction |
| 301 | const ( |
no test coverage detected