You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (Created) (JIRA)" <ji...@apache.org> on 2012/04/12 14:33:17 UTC

[jira] [Created] (DERBY-5690) Give users a way to run an ij script programmatically so they can filter errors.

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: 10.9.0.0
            Reporter: Rick Hillegas


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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5690) Give users a way to run an ij script programmatically so they can filter errors.

Posted by "Dag H. Wanvik (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252481#comment-13252481 ] 

Dag H. Wanvik commented on DERBY-5690:
--------------------------------------

Doesn't the StatementFinder class in ij take two arguments in its constructor?

                
> 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: 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5690) Give users a way to run an ij script programmatically so they can filter errors.

Posted by "Rick Hillegas (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5690:
---------------------------------

    Attachment: StatementReader.java

Attaching StatementReader.java. This class can be used to parse a batch of sql statements the way that ij does. You construct an instance of this class from an InputStream (e.g., a FileInputStream created from your statement batch) and then you loop, calling StatementReader.nextStatement() to drain the batch. Each nextStatement() call returns a single statement. The final call returns null.
                
> 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: 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5690) Give users a way to run an ij script programmatically so they can filter errors.

Posted by "Rick Hillegas (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252496#comment-13252496 ] 

Rick Hillegas commented on DERBY-5690:
--------------------------------------

Hi Dag,

Yes, StatementFinder has different constructors. Getting rid of those constructors is a large part of what you need to do in order to break the dependency on Derby internals and expose this useful functionality to end-users. Thanks.
                
> 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: 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5690) Give users a way to run an ij script programmatically so they can filter errors.

Posted by "Rick Hillegas (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252707#comment-13252707 ] 

Rick Hillegas commented on DERBY-5690:
--------------------------------------

Note that I am advocating the use of StatementReader by applications, not StatementFinder. Thanks.
                
> 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: 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira