You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alex <al...@zoho.com> on 2014/09/05 19:01:25 UTC

[dbutils] Add loading from SQL files to QueryLoader

Hello,
It is pretty convenient to work with queries in a sql file: it can be 
loaded into SQL client (e.g. SQuirrel) and queries can be tested by by 
selecting/running them; you get SQL syntax highlighting and you can save 
from SQL client directly to your project resources directory as you work 
on the queries.
I have this functionality implemented and using it extensively in a 
Scala project and would like to push it to DbUtils instead. Query names 
are delimeted by triple dash and a colon - see attached examples with 
and without tricky comments (that get filtered out during loading whole 
thing into a Map).
I can translate it to Java easily enough - would this be accepted upstream?
-- 
/--Regards, Alex/

Re: [dbutils] Add loading from SQL files to QueryLoader

Posted by Alex <al...@zoho.com>.
DBUTILS-120 <https://issues.apache.org/jira/browse/DBUTILS-120>

On 05/09/14 21:21, Gary Gregory wrote:
> The way to go here is to create a Jira and attach a patch with unit tests.
>
> Gary
>
>
> On Fri, Sep 5, 2014 at 1:01 PM, Alex <al...@zoho.com> wrote:
>
>>   Hello,
>> It is pretty convenient to work with queries in a sql file: it can be
>> loaded into SQL client (e.g. SQuirrel) and queries can be tested by by
>> selecting/running them; you get SQL syntax highlighting and you can save
>> from SQL client directly to your project resources directory as you work on
>> the queries.
>> I have this functionality implemented and using it extensively in a Scala
>> project and would like to push it to DbUtils instead. Query names are
>> delimeted by triple dash and a colon - see attached examples with and
>> without tricky comments (that get filtered out during loading whole thing
>> into a Map).
>> I can translate it to Java easily enough - would this be accepted upstream?
>> --
>> *--Regards, Alex*
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
>

-- 
/--Regards, Alex/

Re: [dbutils] Add loading from SQL files to QueryLoader

Posted by Gary Gregory <ga...@gmail.com>.
The way to go here is to create a Jira and attach a patch with unit tests.

Gary


On Fri, Sep 5, 2014 at 1:01 PM, Alex <al...@zoho.com> wrote:

>  Hello,
> It is pretty convenient to work with queries in a sql file: it can be
> loaded into SQL client (e.g. SQuirrel) and queries can be tested by by
> selecting/running them; you get SQL syntax highlighting and you can save
> from SQL client directly to your project resources directory as you work on
> the queries.
> I have this functionality implemented and using it extensively in a Scala
> project and would like to push it to DbUtils instead. Query names are
> delimeted by triple dash and a colon - see attached examples with and
> without tricky comments (that get filtered out during loading whole thing
> into a Map).
> I can translate it to Java easily enough - would this be accepted upstream?
> --
> *--Regards, Alex*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory