| 1629 | } |
| 1630 | |
| 1631 | func (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: ¶mName, |
| 1637 | Type: &ast.TypeName{Name: types.TypeToStr(sp.ParamType.GetType(), sp.ParamType.GetCharset())}, |
| 1638 | }) |
| 1639 | } |
| 1640 | return &ast.CreateFunctionStmt{ |
| 1641 | Params: ¶ms, |
| 1642 | Func: &ast.FuncName{ |
| 1643 | Schema: n.ProcedureName.Schema.L, |
| 1644 | Name: n.ProcedureName.Name.L, |
| 1645 | }, |
| 1646 | } |
| 1647 | } |
| 1648 | |
| 1649 | func (c *cc) convert(node pcast.Node) ast.Node { |
| 1650 | switch n := node.(type) { |