db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5690) Give users a way to run an ij script programmatically so they can filter errors.
Date Thu, 27 Dec 2012 16:46:12 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Rick Hillegas updated DERBY-5690:

    Attachment: SQLRunner.java

Attaching SQLRunner.java. This program shows how to use StatementReader to loop through a
batch of SQL statements, exiting with error code 1 as soon as an error occurs.

Here is the usage diagnostic from this program:


java SQLRunner connectionURL scriptName


   java SQLRunner "jdbc:derby:memory:db;create=true" "/Users/me/sql/w.sql"

> Give users a way to run an ij script programmatically so they can filter errors.
> --------------------------------------------------------------------------------
>                 Key: DERBY-5690
>                 URL: https://issues.apache.org/jira/browse/DERBY-5690
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions:
>            Reporter: Rick Hillegas
>         Attachments: SQLRunner.java, StatementReader.java
> Sometimes users need a way to run an ij script programmatically and handle the errors.
It would be nice if they could use ij's StatementFinder to parse a semi-colon delimited file
of sql statements, throwing away comments. StatementFinder itself can't be used because it
is not part of the public api and it has some small dependencies on other Derby code. I will
attach a standalone class which applications can use.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message