On Tuesday 07 March 2006 23:57, Bojan Smojver wrote:
> Quoting Bojan Smojver <[EMAIL PROTECTED]>:
> > Nice. If I were to work on the patches along those lines, is there a
> > starting point maybe? An initial set of uncommitted patches? API
> > suggestions?
>
> OK, I'll have stab then. Here is what I had in mind:
>
> - all AP_INIT_TAKE1 become AP_INIT_TAKE2, all AP_INIT_TAKE2 become
> AP_INIT_TAKE3, with the first parameter being the alias for that
> particular connection; for instance:
>
> DBDParams alias param1=value1[,param2=value2]
> DBDMin    alias number

Well, that's an option.  But wouldn't it perhaps be more elegant
to use a container?
<DBDConnection alias>
        DBDriver        foo
        DBDParams "......"
        etc
</DBDConnection>

And if the container is optional, we have back-compatibility for free.

> - every ap_get_module_config/ap_set_module_config fetches/stores a hash
> that has aliases as keys and pointers to svr_cfg pointers as values

That's fine.  Or it could just be an apr array, on the premise that it's
not going to grow so big as to make linear lookup a problem.

> - API calls get another argument, probably at the end, in the form of
> const char *, which is the database alias we want the connection from

AFAICS only dbd_open and dbd_[c]acquire would require an extra arg.
But back-compatibility at the API level would be a Good Thing.

-- 
Nick Kew

Reply via email to