ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Clinton Begin" <clinton.be...@gmail.com>
Subject Re: Setting for removing newlines from SQL?
Date Mon, 11 Aug 2008 03:44:45 GMT
Yeah, that's not hard to add.  It's always a pain to add a new setting in
the XML though. :-)

<side-rant>
DTD/Schema is annoying really.  More accurately, it's annoying that it's on
the web.  I fully appreciate schema/dtd for tooling and documentation (code
completion, quick docs etc.), but having it centralized online is kinda
silly for something like iBATIS.  While our entity resolver does grab it
from the JAR, tools and such will always need it on the web.  So we're
always stuck with this decision:  do we increment the version number?  Or do
we just constantly evlove the DTD/Schema in one direction (always
maintaining backward compatibility and thus never removing anything).  I
think some schemas make sense on line (for web services perhaps), but for
configuration, it should almost be offline, on disk with the software.
Perhaps another pain point that should help us realize XML may not be the
best choice for configuration. :-/
</side-rant>

On Sun, Aug 10, 2008 at 7:59 PM, Ron Grabowski <rongrabowski@yahoo.com>wrote:

> 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 <spam.trash@seznam.cz>
> To: user-java@ibatis.apache.org
> 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.
>

Mime
View raw message