[dev] CyrSQL and SQL driver

Jan Schneider jan at horde.org
Thu May 29 08:34:04 UTC 2008


Zitat von Vilius Šumskas <vilius at lnk.lt>:

>> > As I told earlier, currently Auth_Sql is not so flexible as we wanted
>> > it to be for Cyrus SQL or other similar drivers. Most (if not all)
>> > methods perform only one query to only one particular table. And
>> > unless somebody would
>> > introduced a very flexible way of dealing with queries in Auth_Sql I
>> > don't see how it could change in the near future.
>>
>> If it is only the one-query limitation, we could allow the sql driver
>> to also accept an array of queries. If there are more limitations, a
>> native driver for sql probably makes sense.
>
> Frankly, I don't see how this could be implemented easily and nicely. We
> must pass not only the two queries but data for them too. For example in
> Cyrus SQL's case adding a user takes such backend modifications:
>
> INSERT INTO accountuser (username, password, domain_name) VALUES ('user',
> 'pass', 'example.com');
> INSERT INTO virtual (alias, destination, enabled) VALUES
> ('user at example.com', 'user at example.com', 1);
>
> Currently 'virtual' table name is hardcoded into the driver, but I want to
> do it configurable. So the Auth_Sql should accept more configuration params
> then usual. But I could be wrong.

As I said, if it's more work to change the sql driver to be more  
flexible than to make the cyrussql stand-alone, then go for it. :)

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list