(n *pg.FuncCall)
| 1601 | } |
| 1602 | |
| 1603 | func convertFuncCall(n *pg.FuncCall) *ast.FuncCall { |
| 1604 | if n == nil { |
| 1605 | return nil |
| 1606 | } |
| 1607 | rel, err := parseRelationFromNodes(n.Funcname) |
| 1608 | if err != nil { |
| 1609 | // TODO: How should we handle errors? |
| 1610 | panic(err) |
| 1611 | } |
| 1612 | return &ast.FuncCall{ |
| 1613 | Func: rel.FuncName(), |
| 1614 | Funcname: convertSlice(n.Funcname), |
| 1615 | Args: convertSlice(n.Args), |
| 1616 | AggOrder: convertSlice(n.AggOrder), |
| 1617 | AggFilter: convertNode(n.AggFilter), |
| 1618 | AggWithinGroup: n.AggWithinGroup, |
| 1619 | AggStar: n.AggStar, |
| 1620 | AggDistinct: n.AggDistinct, |
| 1621 | FuncVariadic: n.FuncVariadic, |
| 1622 | Over: convertWindowDef(n.Over), |
| 1623 | Location: int(n.Location), |
| 1624 | } |
| 1625 | } |
| 1626 | |
| 1627 | func convertFuncExpr(n *pg.FuncExpr) *ast.FuncExpr { |
| 1628 | if n == nil { |
no test coverage detected