Skip to content

Commit

Permalink
Fix default values in MSSQL function declaration and missing END keyw…
Browse files Browse the repository at this point in the history
…ord.
  • Loading branch information
darold committed Mar 7, 2024
1 parent 9995693 commit 5ee236b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Ora2Pg/MSSQL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1139,8 +1139,12 @@ sub _lookup_function
$fct_detail{args} =~ s/\s*$//s;
$fct_detail{args} =~ s/^\s*//s;
$fct_detail{code} =~ s/^[\r\n]*/\n/s;
$fct_detail{args} =~ s/[\s]+=[\s]+/ DEFAULT /gs;
$fct_detail{code} =~ s/^[\r\n]*/\n/s;
if ($fct_detail{code} !~ /\sEND$/s) {
$fct_detail{code} =~ s/$/\nEND/;
}
# Remove %ROWTYPE from return type
$fct_detail{func_ret_type} =~ s/\%ROWTYPE//igs;
Expand Down

0 comments on commit 5ee236b

Please sign in to comment.