[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2403) Support multi-line import.sql files

Lukasz Antoniak (JIRA) noreply at atlassian.com
Tue Nov 1 04:06:24 EDT 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44208#comment-44208 ] 

Lukasz Antoniak commented on HHH-2403:
--------------------------------------

Welcome!

I have developed quite simple ANTLR-based parser for this. It deals much better with comments and quoted strings then the one attached in the patch.

This script would break Vitali's parser (just a simple example):
{code:sql}
INSERT INTO data(id, text) VALUES(1, 'a very long
/* commented int here */
text'); -- and a comment here :)
{code}

@Max: My solution definitely passes a single SQL statement into {{Exporter.export(String)}} method at a time.

I will try to introduce it by making a pull request as soon as possible.

Regards,
Lukasz Antoniak

> Support multi-line import.sql files
> -----------------------------------
>
>                 Key: HHH-2403
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2403
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.2.2
>            Reporter: Christian Bauer
>         Attachments: org.hibernate.tool.hbm2ddl.SchemaExport_patch.txt
>
>
> I leave this as Major, because it most likely breaks all existing import.sql's.
> The statement delimiter in import.sql is currently a newline. We need to change that to:
> - delimiter is semicolon, so users can copy/paste stuff from and to SQL consoles
> - newline is a real newline, allows users to enter newlines into larger text columns without a 5000 character wide line

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list