You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2014/09/11 19:44:34 UTC

[jira] [Comment Edited] (DBUTILS-120) Add loading from SQL file to QueryLoader

    [ https://issues.apache.org/jira/browse/DBUTILS-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14130364#comment-14130364 ] 

Sebb edited comment on DBUTILS-120 at 9/11/14 5:43 PM:
-------------------------------------------------------

With the original format, a comment of the form "\-xxxxxx:" would match; only the leading "\-" and trailing ":" distinguish it.

With the suggested format, there has to be a leading string of "  Query:", which is less likely to match accidentally

Personally I think Gary's format also looks nicer.
It's also potentially extendable, in case something other than a Query needs to be provided via comments.


was (Author: sebb@apache.org):
With the original format, a comment of the form "-xxxxxx:" would match; only the leading "-" and trailing ":" distinguish it.

With the suggested format, there has to be a leading string of "  Query:", which is less likely to match accidentally

Personally I think Gary's format also looks nicer.
It's also potentially extendable, in case something other than a Query needs to be provided via comments.

> Add loading from SQL file to QueryLoader
> ----------------------------------------
>
>                 Key: DBUTILS-120
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-120
>             Project: Commons DbUtils
>          Issue Type: Improvement
>            Reporter: Aleksei Kovura
>              Labels: patch
>         Attachments: dbutilsQueryLoader.diff
>
>
> I propose sql file in the following format:
> ---queryName1:
> SELECT * FROM "APP"."TABLE1";
> ---queryName2:
> SELECT column1, column2 FROM "APP"."TABLE2" WHERE column1=?;



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)