ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <larry.mead...@gmail.com>
Subject Re: Re : Remove/trim spaces from generated SQL requests
Date Thu, 26 Jun 2008 12:18:52 GMT
It's the tabs/spaces used for indentation in the sql map file. We
remove the newlines, but not the whitespace.

Larry


On Thu, Jun 26, 2008 at 1:52 AM, Gwyn Evans <gwyn.evans@gmail.com> wrote:
> If I'm reading it correctly, the OP is concerned about the /logging/ output
> that can be seen if you enable the various jdbc logging categories, not the
> actual functionality.  We'd need to see some examples to be sure, but my
> guess is that they're seeing something like
>
> Executing Statement:    SELECT id, name          FROM table
> WHERE          val=?
>
> which will result from a sqlmap such as:
> <select ...>
>     SELECT id, name
>     FROM table
>     WHERE
>           val=?
> </select>
>
> If so, then remove the excess spaces & line-breaks, but really, without
> specific examples, it's just guessing...
>
> /Gwyn
>
> On Wed, Jun 25, 2008 at 11:37 PM, Eric T. Blue <ericblue76@gmail.com> wrote:
>>
>> Gilles,
>>
>> Is your column datatype CHAR?  This may not be the issue, however you may
>> want to check out the differences between CHAR and VARCHAR2.  Ex:
>>
>> http://www.databasesandlife.com/char-vs-varchar-and-varchar2/
>>
>>
>> On Wed, Jun 25, 2008 at 2:36 PM, Gilles Schlienger <s_gilou@yahoo.com>
>> wrote:
>>>
>>> Thanks,
>>> I actually don't really have any special space in the SQL.
>>>
>>> Is the behaviour of seeing many spaces in the logs only happening in the
>>> logs or also when the SQL request executed against the database ?
>>> If that's the case, I guess this can consume a lot of logs on the
>>> database side (binary logs etc...)
>>>
>>> Would any one have any advice on this ? Is anyone doing something special
>>> in Eclipse or with Maven 2 maybe to remove blank spaces ?
>>>
>>> Thanks again
>>> Gilles
>>>
>>> ----- Message d'origine ----
>>> De : Gwyn Evans <gwyn.evans@gmail.com>
>>> À : user-java@ibatis.apache.org
>>> Envoyé le : Mercredi, 25 Juin 2008, 17h55mn 58s
>>> Objet : Re: Remove/trim spaces from generated SQL requests
>>>
>>> Simplest way is surely to not to have the spaces in the sql in the first
>>> place?
>>>
>>> /Gwyn
>>>
>>> On Wed, Jun 25, 2008 at 9:56 AM, Gilles Schlienger <s_gilou@yahoo.com>
>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> I can see in the logs that the SQL requests generated by iBATIS
>>>> (2.3.0.677) have a lot of spaces between some elements of the request.
>>>>
>>>> I feel it might be keeping blanks from the XML sql_map file ...?
>>>> Would there be a way to "trim" these requests to have more readable logs
>>>> please ?
>>>>
>>>> Thanks a lot in advance
>>>> Regards
>>>> Gilles
>>>>
>>>>
>>>>
>>>>
>>>>  _____________________________________________________________________________
>>>> Envoyez avec Yahoo! Mail. Une boite mail plus intelligente
>>>> http://mail.yahoo.fr
>>>
>>>
>>> ________________________________
>>> Envoyé avec Yahoo! Mail.
>>> Une boite mail plus intelligente.
>
>

Mime
View raw message