I've encountered a couple of times when I've been doing a lot of dynamic sql 
and would have liked to preserve the newlines in the sql. Makes it easier to 
understand what the problem is when I copied and pasted the text into a 
database management program. 

What about a global setting that defaults to the current behavior or adding an 
attribute to the <statement /> node that allows the sql layout to be preserved.



----- Original Message ----
From: John Clash <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sunday, August 10, 2008 4:29:54 PM
Subject: Setting for removing newlines from SQL?


Hi,

I've came across an issue with the double-dash comments, as reported here:
https://issues.apache.org/jira/browse/IBATIS-203

In a short:

       <select>
                SELECT * FROM table
               -- Here is my comment.
                WHERE col = 5
        </select>

gets parsed into

        SELECT * FROM table -- Here is my comment. WHERE col = 5

Using other forms of comments reduces the code readability.

Is there any way to switch off removing the newlines in iBatis 2?

Thanks, Ondra 

-- 
View this message in context: 
http://www.nabble.com/Setting-for-removing-newlines-from-SQL--tp18916746p18916746.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to