Print Thread
Beautifier - changed behaviour
#63409 02/21/22 08:40 PM
Joined: Jan 2018
Posts: 6
O
Olafur Offline OP
Member
OP Offline
Member
O
Joined: Jan 2018
Posts: 6
Hey,

I can't get the beautifier to format the json_table columns syntax correctly. It worked fine in 14.

Using beta 15.0.0.2044

This:
Code
select t.*
  from vf_customer_registers r
       left join (json_table(r.register,
                  '$' columns(day_price varchar2(80) path '$.DAY_PRICE' null on empty,
                          base_price number path '$.BASE_PRICE' null on empty,
                          base_hours number path '$.BASE_HOURS' null on empty,
                          refreshments varchar2(80) path '$.REFRESHMENTS' null on empty,
                          penalty_hour number path '$.PENALTY_HOUR' null on empty,
                          long_day format json path '$.LONG_DAY' null on empty,
                          long_day_lunch number path '$.LONG_DAY_LUNCH' null on empty,
                          discount_sibling  varchar2(80) path '$.DISCOUNT_SIBLING' null on empty,
                          discount_refreshments  varchar2(80) path '$.DISCOUNT_REFRESHMENTS' null on empty,
                          discount_kindergarten number path '$.DISCOUNT_KINDERGARTEN' null on empty,
                          discount_sports number path '$.DISCOUNT_SPORTS' null on empty))) t on 1 = 1
order by r.customer, r.valid_from desc;

Gets formatted to:
Code
select t.*
  from vf_customer_registers r
  left join(json_table(r.register, '$' columns(day_price varchar2(80) path '$.DAY_PRICE' null
    on empty, base_price number path '$.BASE_PRICE' null on empty, base_hours number path '$.BASE_HOURS' null on empty, refreshments varchar2(80) path
 '$.REFRESHMENTS' null on empty, penalty_hour number path '$.PENALTY_HOUR' null on empty, long_day format json path '$.LONG_DAY' null on empty,
 long_day_lunch number path '$.LONG_DAY_LUNCH' null on empty, discount_sibling varchar2(80) path '$.DISCOUNT_SIBLING' null on empty,
 discount_refreshments varchar2(80) path '$.DISCOUNT_REFRESHMENTS' null on empty, discount_kindergarten number path '$.DISCOUNT_KINDERGARTEN' null on
 empty, discount_sports number path '$.DISCOUNT_SPORTS' null on empty))) t on 1 = 1
 order by r.customer, r.valid_from desc;


Thanks.

Last edited by Olafur; 02/21/22 08:41 PM.
Re: Beautifier - changed behaviour
Olafur #63424 02/22/22 10:16 AM
Joined: Aug 1999
Posts: 21,745
Member
Offline
Member
Joined: Aug 1999
Posts: 21,745
They format the same in 14.0 and 15.0, but we'll look into the issue.


Marco Kalter
Allround Automations

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4