[ 
https://issues.apache.org/jira/browse/IBATIS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12473664
 ] 

Claus Ibsen commented on IBATIS-143:
------------------------------------

Hmm is it really that easy?

What about double spaces in selection text?

select *
from mytable t
where  t.category = 'USER    '
where there should be 3 spaces in the 'USER    ' text as it's a 7 char fixed 
column?

> Remove blanks in SQL
> --------------------
>
>                 Key: IBATIS-143
>                 URL: https://issues.apache.org/jira/browse/IBATIS-143
>             Project: iBatis for Java
>          Issue 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to