MCPcopy
hub / github.com/sqlc-dev/sqlc / convertFuncCall

Function convertFuncCall

internal/engine/postgresql/convert.go:1603–1625  ·  view source on GitHub ↗
(n *pg.FuncCall)

Source from the content-addressed store, hash-verified

1601}
1602
1603func 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
1627func convertFuncExpr(n *pg.FuncExpr) *ast.FuncExpr {
1628 if n == nil {

Callers 1

convertNodeFunction · 0.85

Calls 5

parseRelationFromNodesFunction · 0.85
convertSliceFunction · 0.85
convertNodeFunction · 0.85
convertWindowDefFunction · 0.85
FuncNameMethod · 0.80

Tested by

no test coverage detected