[ 
http://issues.apache.org/jira/browse/IBATIS-143?page=comments#action_12356748 ] 

Paul Benedict commented on IBATIS-143:
--------------------------------------

I prefer this feature too. The problem is that I like my SQL to be listed 
longwise, with each column on its own line and so it can become stretched with 
many useless whitespaces when listed out on one line. Not to mention, because 
the SQL is in an XML file, all that identation is preserved too. I wish it 
could be removed. I know many XML parsers have a feature to trim down the 
padding to one white space on each side. That would be so much better!!

> Remove blanks in SQL
> --------------------
>
>          Key: IBATIS-143
>          URL: http://issues.apache.org/jira/browse/IBATIS-143
>      Project: iBatis for Java
>         Type: Improvement
>   Components: SQL Maps
>  Environment: all
>     Reporter: Steffen Legler
>     Priority: Minor

>
> Dynamically built SQL-Statements include a lot of blanks when using 
> conditional
> elements like <isEqual>. The database doesn't care, but for logging it would 
> be
> nice to have a well written sql-statement, e.g. :
> <update id="update" parameterClass="paramClass">
>       update schema.table1 set 
>                       <isEqual property="listId" compareValue="1">
>                       column1 = #value#                                       
>         
>                       </isEqual>      
>                       <isEqual property="listId" compareValue="2">
>                       column2 = #value#                                       
>         
>                       </isEqual>                      
>               where id=#instanceId#
> </update>
>  
> The result of a statement looks like this;
>       update schema.table1 set          column1 = '123'                       
>       where id = 1000
>                       
> For readability it would be nice to have something like this:
> update schema.table1 set column1 = '123' where id = 1000

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to