MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / convertProcedureInfo

Method convertProcedureInfo

internal/engine/dolphin/convert.go:1631–1647  ·  view source on GitHub ↗
(n *pcast.ProcedureInfo)

Source from the content-addressed store, hash-verified

1629}
1630
1631func (c *cc) convertProcedureInfo(n *pcast.ProcedureInfo) ast.Node {
1632 var params ast.List
1633 for _, sp := range n.ProcedureParam {
1634 paramName := sp.ParamName
1635 params.Items = append(params.Items, &ast.FuncParam{
1636 Name: &paramName,
1637 Type: &ast.TypeName{Name: types.TypeToStr(sp.ParamType.GetType(), sp.ParamType.GetCharset())},
1638 })
1639 }
1640 return &ast.CreateFunctionStmt{
1641 Params: &params,
1642 Func: &ast.FuncName{
1643 Schema: n.ProcedureName.Schema.L,
1644 Name: n.ProcedureName.Name.L,
1645 },
1646 }
1647}
1648
1649func (c *cc) convert(node pcast.Node) ast.Node {
1650 switch n := node.(type) {

Callers 1

convertMethod · 0.95

Calls 1

GetTypeMethod · 0.45

Tested by

no test coverage detected