Beautifier and table of tables

Bo Pedersen

Member²
The beautifier adds a space between the indexing of a table of tables like in:

Code:
current_steps(p_product) (j)
This doesn't look nice. But worse, when standing at the end of the line, the second indexing can be written on a new line making it hard to read the code.
 
Along the same line. A function call after an indexing can be moved to the next line

Code:
...historical_steps(p_product)
                       .count
 
Yes, I'm using 6.0.4. A simple package specification:

Code:
create or replace package test is
  procedure test;
end test;
And the body:

Code:
create or replace package body test is
  type id_list is table of pls_integer;
  type product_id_map is table of id_list index by varchar2(60);
  product_ids product_id_map;

  procedure test is
  begin
    product_ids('EL_01') := id_list(50, 51, 54, 55, 56, 57, 58, 59);

    if (true and true and true and true and true and true and true and product_ids('EL_01')
       .count > 0) then
      dbms_output.put_line('Long text xxxxxxxxxxxxxxxxxxxxxxxx: ' || product_ids('EL_01')
                           (1) || ' more text');
    end if;
  end;

end test;
My margin is set to 100. Here .count is shown on a new line. And product_ids(l_product)(1) is splitted. I tried unsuccessfully to reproduce the last issue when calling a procedure with many parameters. So it may only be an issue with string concatenation.

Hope it helps

Bo Pedersen
 
Back
Top