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: migration tools support sql comment
Date Thu, 13 Aug 2009 15:24:48 GMT
Then should support all comment styles from various databases... We don't
want DB specific stuff in iBATIS.

Clinton

On Thu, Aug 13, 2009 at 9:21 AM, Guoyou Jiang <guoyou.jiang@jsvest.com>wrote:

> ok, thanks,
> but i think when read line from file, we can search this line, if contains
> "--" , just use substring to cut the comment begin with "--".
>
> 2009/8/13 Clinton Begin <clinton.begin@gmail.com>
>
> the problem is that many JDBC drivers have problems with newline
>> characters.  So we have to put the SQL all in one line.  I think there's an
>> open request to make it optional, and if I recall correctly, in iBATIS 3 I
>> send the statement as is... so we'll see how many JDBC drivers/databases
>> still have the problem!
>>
>>
>>
>> On Thu, Aug 13, 2009 at 8:52 AM, Guoyou Jiang <guoyou.jiang@jsvest.com>wrote:
>>
>>> seems if the sql file contains comment at line end will cause error, like
>>> this:
>>> CREATE TABLE groups
>>> (
>>>   id bigserial NOT NULL,                              *--the primary key
>>> *
>>>   group_code varchar(50),*                           --code*
>>>   group_name varchar(50) NOT NULL,
>>>   group_type varchar(100) NOT NULL,
>>>   parent_id bigint,
>>>   department_type varchar(50),
>>>   business_relation_type varchar(50),
>>>   business_relation_value varchar(50),
>>>   memo varchar(200),
>>>   PRIMARY KEY (id),
>>>   CONSTRAINT groups_parent_id_fkey FOREIGN KEY (parent_id)
>>>       REFERENCES groups (id)
>>> );
>>>
>>> can we support this type comment? thanks!
>>>
>>
>>
>

Mime
View raw message