File tree 1 file changed +21
-0
lines changed
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1458,6 +1458,24 @@ func (c *cc) convertCallStmt(n *pcast.CallStmt) ast.Node {
1458
1458
}
1459
1459
}
1460
1460
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
+
1461
1479
func (c * cc ) convert (node pcast.Node ) ast.Node {
1462
1480
switch n := node .(type ) {
1463
1481
@@ -1734,6 +1752,9 @@ func (c *cc) convert(node pcast.Node) ast.Node {
1734
1752
case * pcast.PrivElem :
1735
1753
return c .convertPrivElem (n )
1736
1754
1755
+ case * pcast.ProcedureInfo :
1756
+ return c .convertProcedureInfo (n )
1757
+
1737
1758
case * pcast.RecoverTableStmt :
1738
1759
return c .convertRecoverTableStmt (n )
1739
1760
You can’t perform that action at this time.
0 commit comments