commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (DBUTILS-120) Add loading from SQL file to QueryLoader
Date Thu, 11 Sep 2014 18:31:33 GMT


Sebb commented on DBUTILS-120:

It would be quite easy to accidentally use triple dashes.
And triple dashes are valid as normal comments.

It's vital to choose a syntax that is very unlikely to be present in an existing file comment.
Otherwise it may break existing usages.

One cannot guarantee that no-one has used "-- Query:name" as an existing comment, but:
- it is less likely than the original syntax
- it's much easier to scan the file looking for the "-- Query:" prefix, both visually and
using file search
- the syntax can be extended if necessary.

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

This message was sent by Atlassian JIRA

View raw message