On 07/03/14 14:33, Dimitry Sibiryakov wrote:
> 03.07.2014 11:27, Alex Peshkoff wrote:
>> Mixing plugin-specific parameters with firebird parameters in same heap
>> is bad idea. Mixing 2 sets of parameters of 2 plugins in same heap is
>> even more bad - each plugin would like to have parameter 'Foo' for
>> different purporses. Can we suggest a format that avoids this conflict?
>     If plugin can get its configured (not given by developer) name, then I 
> would suggest
> following syntax for databases.conf:
>
> MyDB = MyDB
> {
>       SomePlugins = aaa,bbb,ccc
>       aaa = {
>               Foo=Bar
>       }
>       bbb = {
>               Foo=Rab
>       }
> }
>
>     Plugin can get its parameters by using
> IConfig->find(MyName)->getSubConfig()->find("Foo")->getValue().
>     If parameters are not configured on database level, it should get global 
> ones from
> plugins.conf.

MyDB = MyDB
{
        Plugin = aaa
        {
                Foo=Bar
        }
        Plugin = bbb
        {
                Foo=Rab
        }
}

?
This syntax fits much better into current config files.

>     BTW, I don't like so long call chain. I would prefer simpler
> IConfig->asSubConfig(MyName)->asString("Foo","My default")
>

iConfig->findValue("Plugin", MyName)->getSubConfig()->find("Foo")->getValue().

Shorter syntax is good as long as you are not doing many different ops 
with an object. BTW, nothing prevents from having both of them.


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to