Enhancement Request - Beautifier

Harinath

Member
Hi,

The current beautifier options does not allow us to defite the style for functions like SUBSTR, DECODE

I would like to request for an extra tab providing options customizing these, for example my current setting formats my SUBSTR function code like this..

SUBSTR(hc.account_number
,1
,2) = 'TH'

But since the coding is small I would like it to be ...

SUBSTR(hc.account_number, 1, 2) = 'TH'

Regards,
 
Could you also change the way case statements are handled?

I don't want to have THEN on a new line. My case statements now are lined up ALL on one single line. You may use this (silly) example:

declare
a Number;
b varchar2(500);
begin
b := case a when 1 then 'xxxxxxxxxxxxxxx' when 2 then 'yyyyyyyyyyyyyyy' when 3 then 'zzzzzzzzzzzzzzzzzzzzzzz' when 4 then 'hhhhhhhhhhhhhhhhhhhhhhhhhhh' when 5 then '555555555555555555555' when 6 then '666666666666666666666666666666666666' when 7 then '7777777777777777777777777777777777777777777777777777777777' else 'else' end; -- case
end;

I would like this to be formatted for instance this way (Im using undercase instead of blanks, since they were all stripped of when pasting the text here):

declare
__a Number;
__b varchar2(500);
begin
__b := case a when 1 then 'xxxxxxxxxxxxxxx'
______________when 2 then 'yyyyyyyyyyyyyyy'
______________when 3 then 'zzzzzzzzzzzzzzzzzzzzzzz'
______________when 4 then 'hhhhhhhhhhhhhhhhhhhhhhhhhhh'
______________when 5 then '555555555555555555555'
______________when 6 then '666666666666666666666666666666666666'
______________when 7 then '7777777777777777777777777777777777777777777777777777777777'
______________else 'else'
_______end; -- case
end;
 
Please use {CODE} and {/CODE} change { by [

Code:
declare
  a Number;
  b varchar2(500);
begin
  b := case a when 1 then 'xxxxxxxxxxxxxxx'
              when 2 then 'yyyyyyyyyyyyyyy'
              when 3 then 'zzzzzzzzzzzzzzzzzzzzzzz'
              when 4 then 'hhhhhhhhhhhhhhhhhhhhhhhhhhh'
              when 5 then '555555555555555555555'
              when 6 then '666666666666666666666666666666666666'
              when 7 then '7777777777777777777777777777777777777777777777777777777777'
              else 'else'
       end; -- case
end;
 
Back
Top