[dev] CyrSQL and SQL driver
Jan Schneider
jan at horde.org
Thu May 29 07:27:57 UTC 2008
Zitat von Vilius ?umskas <vilius at lnk.lt>:
> Sveiki,
>
> Wednesday, May 28, 2008, 5:27:57 PM, you wrote:
>
>> Zitat von Vilius ?umskas <vilius at lnk.lt>:
>
>>> Hello,
>>>
>>> I was thinking about completely separating Cyrus SQL driver from
>>> Horde's native SQL driver, e.i. extend it directly from Auth. There
>>> are couple of reasons because I *think* this could be a good idea.
>>>
>>> 1) As I found out in one of my smaller installations current
>>> implementation of driver have some gliches in a environment where Cyrus
>>> virtual domains are disabled. So there is a need to rewrite addUser
>>> and removeUser methods in such a way they will not use their parent
>>> methods. This leaves us with only one thing dependand
>>> on Auth_sql, making a connection to MySQL server with a
>>> _connect(). Again I *think* it will be faster to just make the
>>> driver independand and extend directly from Auth.
>>>
>>> 2) Cyrus SQL logic and stucture is very different from what we have in
>>> Horde's SQL. For example, when you create a user you must add two
>>> entries in 2 different MySQL tables and you must also create a
>>> mailbox on Cyrus IMAP server. The same goes about updating or
>>> removing the user.
>>>
>>> Are there any objections or could I start working on this? What is
>>> your thoughts on this?
>
>> I'm not sure if I followed you exactly, but do you want to change the
>> cyrussql driver to no longer extend the sql driver?
>
> Exactly.
>
>> If _connect() is all that's left to share, and you can't change sql
>> for better re-usability in cyrussql, then I wouldn't object.
>
> 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.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the dev
mailing list