Re: store JDBC SQL in Properties

Поиск
Список
Период
Сортировка
Искать
От
Thomas Kellerer
Тема
Re: store JDBC SQL in Properties
Дата
Msg-id
bflg67$h1e$1@main.gmane.org
Ответ на
Список
Дерево обсуждения
store JDBC SQL in Properties Erik Price <eprice@ptc.com>
Re: store JDBC SQL in Properties Thomas Kellerer <spam_eater@gmx.net>
Erik Price schrieb:
> I have a Java class that has a kind of large SQL query.  Right now it is 
> a series of concatenated strings, occupying about twenty lines of my 
> source code file.  Performance is not a concern to me at this point, but 
> I would like to store the SQL query string in a Properties file so that 
> it does not clutter my code.  However, I can't find a reference to 
> acceptable Properties file syntax -- is it allowed to have multiline 
> property values?  Like this:
> 
> # jdbc.sql.properties
> com.erikprice.sql.select=SELECT some_value,
>                                 some_other_value,
>                                 yet_another_value
>                          FROM some_table
>                          WHERE some_condition
> 
Although this is not a JDBC question :-)

The Properties class supports the line continuation character \


com.erikprice.sql.select=SELECT some_value,        \
                                 some_other_value,  \
                                 yet_another_value  \
                          FROM some_table           \
                          WHERE some_condition      \


Thomas

В списке pgsql-jdbc по дате отправления
От: Oana Mitrea
Дата:
Сообщение: unsubscribe me please
От: anderson
Дата:
Сообщение: unsubscribe me
FAQ