Wishlist: Beautifier

ScottMattes

Member³
This might be a case of not being able to have it both ways, but I'll ask anyway and see if someone has an idea.

I would like to have my selects look like so

select fld1,
fld2,
fld3
from tbl1,
tbl2
where fld4 = substr( var6, 1, 4 )
and fld9 = var7;

instead of

select fld1,
fld2,
fld3
from tbl1,
tbl2
where fld4 = substr( var6,
1,
4 )
and fld9 = var7;
 
Oh, and by the way, I'd like an option to have decode lined up like so

decode( var1,
match1, value1,
match2, value2,
no_match_value );

And, have I ever mentioned wanting to be able to force x blank lines before a proc/func? Or a space after things like ( and before )?

BTW, when is 6.0.3 coming?
 
Set the "Item Lists" format to anything but "One item per line".

I have added you decode suggestion to the list of enhancement requests.
 
But I want my item list one per line, I just don't want my param lists one per line. Well, I do in the specification, but not in the calls.

the spec I want like this

procedure xyz( p1 in string,
p2 in out char,
p3 out integer )
is

The call I want like this

xyz( 'hello world', my_name, answer );
 
There is another problem with (2 examples):

1) for bulk collect:

LOOP
FETCH c_cvrg_policy BULK COLLECT
INTO t_id, t_stat_id, t_pstat_id, t_time_id, t_type_id, t_pbnf_id, t_policy_no, t_proposal_no, t_owned_policy_flag, t_in_agr_id, t_in2_agr_id, t_gr_agr_id, t_sper_id, t_stct_id LIMIT 250000;

where everything after into is placed in the same line and this format can't be changed.

2)
UPDATE t_table1 stg
SET (nat_key_level1_code, nat_key_level2_code, nat_key_level3_code, nat_key_level4_code, nat_key_level5_code, nat_key_level6_code, nat_key_level7_code, nat_key_level8_code, nat_key_level9_code, level_count, terminated, organization_level, basic_sales_level, over_sales_level, basic_sl_symbol, basic_sl_commission_flag, basic_sl_desc, over_sl_symbol, over_sl_commission_flag, over_sl_desc, distrib_src, distrib_src_agency, distrib_src_desc, nat_key_ag_struct_id) = (SELECT DECODE(NVL(asi9.fk_pa_spers_code,

it is very long line (everythig placed in paranthesis), where "(select " and rest of the code is disapering somewhere at the end of this line.

regards
 
Some other suggestions/wishes for the Beautifier:

* Position closing brackets in the same column
as the opening bracket. e.g.

Code:
(p_param1
  ,p_param2
  )
instead of

Code:
(p_param1
  ,p_param2)
* Allign operators. e.g.

Code:
where t1.column1    = t2.column1
  and   t1.column_two = t2.column_two
instead of

Code:
where t1.column1 = t2.column1
  and   t1.column_two = t2.column_two
* Allign comma's with keywords in SQL Statement.
e.g.

Code:
select t1.column1
  ,      t1.column2
instead of

Code:
select t1.column1
        ,t1.column2
* Allow column mode editin, which would be
very handy when inserting table aliases or
record/PLSQL Table names before column names.
Right now I always have to copy/paste into
Ultraedit.
 
There is another (for case statement):
UPDATE t_status_img l
SET l.ext_id = (CASE WHEN status_code = -1 THEN - 1 WHEN status_code = -2 THEN - 2 WHEN status_code = -3 THEN - 3 WHEN status_code = -4 THEN - 4 WHEN status_code = -5 THEN - 5 END)
WHERE status_code < 0
AND ext_id > 0;

regards
 
While we're on the subject :)

If I have a cursor variable with parameters, e.g.,

Code:
cursor cur_forecast(p_ship_to_id in customers.customer_id%type, p_product_hierarchy_code in product_hierarchy.product_hierarchy_code%type, p_substitution_id in vmi_substitutions.substitution_id%type, p_end_date in date) is
      select date_of_receipt, ...
The beautifier will put all of the arguments on one long line, no matter what beautifier option is chosen.
 
Back
Top