File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1458,6 +1458,24 @@ func (c *cc) convertCallStmt(n *pcast.CallStmt) ast.Node {
14581458 }
14591459}
14601460
1461+ func (c * cc ) convertProcedureInfo (n * pcast.ProcedureInfo ) ast.Node {
1462+ var params ast.List
1463+ for _ , sp := range n .ProcedureParam {
1464+ paramName := sp .ParamName
1465+ params .Items = append (params .Items , & ast.FuncParam {
1466+ Name : & paramName ,
1467+ Type : & ast.TypeName {Name : types .TypeToStr (sp .ParamType .GetType (), sp .ParamType .GetCharset ())},
1468+ })
1469+ }
1470+ return & ast.CreateFunctionStmt {
1471+ Params : & params ,
1472+ Func : & ast.FuncName {
1473+ Schema : n .ProcedureName .Schema .L ,
1474+ Name : n .ProcedureName .Name .L ,
1475+ },
1476+ }
1477+ }
1478+
14611479func (c * cc ) convert (node pcast.Node ) ast.Node {
14621480 switch n := node .(type ) {
14631481
@@ -1734,6 +1752,9 @@ func (c *cc) convert(node pcast.Node) ast.Node {
17341752 case * pcast.PrivElem :
17351753 return c .convertPrivElem (n )
17361754
1755+ case * pcast.ProcedureInfo :
1756+ return c .convertProcedureInfo (n )
1757+
17371758 case * pcast.RecoverTableStmt :
17381759 return c .convertRecoverTableStmt (n )
17391760
You can’t perform that action at this time.
0 commit comments