File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1442,6 +1442,24 @@ func (c *cc) convertCallStmt(n *pcast.CallStmt) ast.Node {
1442
1442
}
1443
1443
}
1444
1444
1445
+ func (c * cc ) convertProcedureInfo (n * pcast.ProcedureInfo ) ast.Node {
1446
+ var params ast.List
1447
+ for _ , sp := range n .ProcedureParam {
1448
+ paramName := sp .ParamName
1449
+ params .Items = append (params .Items , & ast.FuncParam {
1450
+ Name : & paramName ,
1451
+ Type : & ast.TypeName {Name : types .TypeToStr (sp .ParamType .GetType (), sp .ParamType .GetCharset ())},
1452
+ })
1453
+ }
1454
+ return & ast.CreateFunctionStmt {
1455
+ Params : & params ,
1456
+ Func : & ast.FuncName {
1457
+ Schema : n .ProcedureName .Schema .L ,
1458
+ Name : n .ProcedureName .Name .L ,
1459
+ },
1460
+ }
1461
+ }
1462
+
1445
1463
func (c * cc ) convert (node pcast.Node ) ast.Node {
1446
1464
switch n := node .(type ) {
1447
1465
@@ -1718,6 +1736,9 @@ func (c *cc) convert(node pcast.Node) ast.Node {
1718
1736
case * pcast.PrivElem :
1719
1737
return c .convertPrivElem (n )
1720
1738
1739
+ case * pcast.ProcedureInfo :
1740
+ return c .convertProcedureInfo (n )
1741
+
1721
1742
case * pcast.RecoverTableStmt :
1722
1743
return c .convertRecoverTableStmt (n )
1723
1744
You can’t perform that action at this time.
0 commit comments