NewTypedColumnAccessExpr creates a pre-typed ColumnAccessExpr. A by-index ColumnAccessExpr can be specified by passing an empty string as colName.
(expr TypedExpr, colName string, colIdx int)
| 1717 | // NewTypedColumnAccessExpr creates a pre-typed ColumnAccessExpr. |
| 1718 | // A by-index ColumnAccessExpr can be specified by passing an empty string as colName. |
| 1719 | func NewTypedColumnAccessExpr(expr TypedExpr, colName string, colIdx int) *ColumnAccessExpr { |
| 1720 | return &ColumnAccessExpr{ |
| 1721 | Expr: expr, |
| 1722 | ColName: colName, |
| 1723 | ByIndex: colName == "", |
| 1724 | ColIndex: colIdx, |
| 1725 | typeAnnotation: typeAnnotation{typ: &expr.ResolvedType().TupleContents()[colIdx]}, |
| 1726 | } |
| 1727 | } |
| 1728 | |
| 1729 | // Format implements the NodeFormatter interface. |
| 1730 | func (node *ColumnAccessExpr) Format(ctx *FmtCtx) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…