Trivadis / plsql-formatter-settings

PL/SQL & SQL formatter settings based on the Trivadis PL/SQL & SQL Coding Guidelines
Apache License 2.0
134 stars 46 forks source link

Double quotes removed from xmlelement after format. #278

Closed rahulmnorcl closed 3 months ago

rahulmnorcl commented 3 months ago

xmlelement( "EXTEND", xmlelement( "CF_LE_LOGO", XX_BI_PUB_COM_UTIL_PKG.get_le_logo(l_legal_entity_id) );

changes to xmlelement( EXTEND, xmlelement( CF_LE_LOGO, XX_BI_PUB_COM_UTIL_PKG.get_le_logo(l_legal_entity_id) )

after format.

PhilippSalvisberg commented 3 months ago

It's a feature. Quoted identifiers are not necessary in this case. Makes the code more readable. See https://github.com/Trivadis/plsql-formatter-settings/issues/238. Closing the issue

rahulmnorcl commented 3 months ago

thank you for the response. I understand now. Double quotes are only removed from identifiers without spaces and are retained for identifiers with spaces (putting spaces in identifiers is not advisable :) )

select XMLConcat( xmlelement( EXTEND, xmlelement("FIELD WITH SPACES", CUST_EG_PKG.func1) ), xmlelement( EXTEND, xmlelement(FIELD_WO_SPACES1, CUST_EG_PKG.func2) ) ) from DUAL;