@@ -2489,12 +2489,9 @@ pub fn statement_body(i: Input) -> IResult<Statement> {
24892489 let name = ProcedureIdentity {
24902490 name : name. to_string ( ) ,
24912491 args_type : if let Some ( args) = & args {
2492- args. iter ( )
2493- . map ( |arg| arg. data_type . to_string ( ) )
2494- . collect :: < Vec < String > > ( )
2495- . join ( "," )
2492+ args. iter ( ) . map ( |arg| arg. data_type . clone ( ) ) . collect ( )
24962493 } else {
2497- "" . to_string ( )
2494+ vec ! [ ]
24982495 } ,
24992496 } ;
25002497 let stmt = CreateProcedureStmt {
@@ -2558,14 +2555,7 @@ pub fn statement_body(i: Input) -> IResult<Statement> {
25582555 if_exists : opt_if_exists. is_some ( ) ,
25592556 name : ProcedureIdentity {
25602557 name : name. to_string ( ) ,
2561- args_type : if args. is_empty ( ) {
2562- "" . to_string ( )
2563- } else {
2564- args. iter ( )
2565- . map ( |arg| arg. to_string ( ) )
2566- . collect :: < Vec < String > > ( )
2567- . join ( "," )
2568- } ,
2558+ args_type : args,
25692559 } ,
25702560 } )
25712561 } ,
@@ -2579,14 +2569,7 @@ pub fn statement_body(i: Input) -> IResult<Statement> {
25792569 Statement :: DescProcedure ( DescProcedureStmt {
25802570 name : ProcedureIdentity {
25812571 name : name. to_string ( ) ,
2582- args_type : if args. is_empty ( ) {
2583- "" . to_string ( )
2584- } else {
2585- args. iter ( )
2586- . map ( |arg| arg. to_string ( ) )
2587- . collect :: < Vec < String > > ( )
2588- . join ( "," )
2589- } ,
2572+ args_type : args,
25902573 } ,
25912574 } )
25922575 } ,
@@ -3636,14 +3619,7 @@ pub fn grant_source(i: Input) -> IResult<AccountMgrSource> {
36363619 privileges : vec ! [ UserPrivilegeType :: AccessProcedure ] ,
36373620 level : AccountMgrLevel :: Procedure ( ProcedureIdentity {
36383621 name : name. to_string ( ) ,
3639- args_type : if args. is_empty ( ) {
3640- "" . to_string ( )
3641- } else {
3642- args. iter ( )
3643- . map ( |arg| arg. to_string ( ) )
3644- . collect :: < Vec < String > > ( )
3645- . join ( "," )
3646- } ,
3622+ args_type : args,
36473623 } ) ,
36483624 } ,
36493625 ) ;
@@ -3656,14 +3632,7 @@ pub fn grant_source(i: Input) -> IResult<AccountMgrSource> {
36563632 privileges : vec ! [ UserPrivilegeType :: AccessProcedure ] ,
36573633 level : AccountMgrLevel :: Procedure ( ProcedureIdentity {
36583634 name : name. to_string ( ) ,
3659- args_type : if args. is_empty ( ) {
3660- "" . to_string ( )
3661- } else {
3662- args. iter ( )
3663- . map ( |arg| arg. to_string ( ) )
3664- . collect :: < Vec < String > > ( )
3665- . join ( "," )
3666- } ,
3635+ args_type : args,
36673636 } ) ,
36683637 } ,
36693638 ) ;
@@ -3833,14 +3802,7 @@ pub fn on_object_name(i: Input) -> IResult<GrantObjectName> {
38333802 |( _, name, args) | {
38343803 GrantObjectName :: Procedure ( ProcedureIdentity {
38353804 name : name. to_string ( ) ,
3836- args_type : if args. is_empty ( ) {
3837- "" . to_string ( )
3838- } else {
3839- args. iter ( )
3840- . map ( |arg| arg. to_string ( ) )
3841- . collect :: < Vec < String > > ( )
3842- . join ( "," )
3843- } ,
3805+ args_type : args,
38443806 } )
38453807 } ,
38463808 ) ;
@@ -3979,14 +3941,7 @@ pub fn grant_ownership_level(i: Input) -> IResult<AccountMgrLevel> {
39793941 |( _, name, args) | {
39803942 let name = ProcedureIdentity {
39813943 name : name. to_string ( ) ,
3982- args_type : if args. is_empty ( ) {
3983- "" . to_string ( )
3984- } else {
3985- args. iter ( )
3986- . map ( |arg| arg. to_string ( ) )
3987- . collect :: < Vec < String > > ( )
3988- . join ( "," )
3989- } ,
3944+ args_type : args,
39903945 } ;
39913946 AccountMgrLevel :: Procedure ( name)
39923947 } ,
0 commit comments