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)
| 1682 | // NewTypedColumnAccessExpr creates a pre-typed ColumnAccessExpr. |
| 1683 | // A by-index ColumnAccessExpr can be specified by passing an empty string as colName. |
| 1684 | func NewTypedColumnAccessExpr(expr TypedExpr, colName string, colIdx int) *ColumnAccessExpr { |
| 1685 | return &ColumnAccessExpr{ |
| 1686 | Expr: expr, |
| 1687 | ColName: colName, |
| 1688 | ByIndex: colName == "", |
| 1689 | ColIndex: colIdx, |
| 1690 | typeAnnotation: typeAnnotation{typ: expr.ResolvedType().TupleContents()[colIdx]}, |
| 1691 | } |
| 1692 | } |
| 1693 | |
| 1694 | // Format implements the NodeFormatter interface. |
| 1695 | func (node *ColumnAccessExpr) Format(ctx *FmtCtx) { |
nothing calls this directly
no test coverage detected