David Saez Padros wrote:
well, it's hard to understand why NOW() does not work and now() works, but as mysql works with both i changed it to now()
CURRENT_TIMESTAMP might be the better choice .. atleast for mysql 4.x and postgresql and the rest of the RDBMS world :-)
maybe it's not a good idea, mdb2 is still beta and does not support as many database backeds as pear does, maybe it's better to have both functional. Also having a first 'abstraction' layer at rcube_db will allow in the future to add or replace the database backend without effort.
You maybe right.... but I can live with just support for MDB2. I think MDB2 will be stable before RoundCube gets out of beta state.
from my point of view replacing the current rcube_db with mdb2 is a bad idea, first it involves work and no real beneffit, you loose replication support and if something goes wrong with mdb2 you are totally tied to it (what happens if mdb2 is still beta when rc has to be released). Having a own layer is a degree of freedom that does not impose any restriction or speed problem and let's you change all database backend whenever you like with little effort.
I would agree if RC could use __call() overloading. But this would make it php5 dependent as in php4 overloading never worked properly. Without it you are likely to have to maintain a needlessly large redundant API.
I saw your solution but this still requires to add a separate abstraction in our layer for each new database. If there's an abstraction functionality in the PEAR package we should use this.
as far as i know pear does not have this functionality and i cannot
I havent implemented unix timestamp function call abstraction yet. I doubt its going to be easy as from a first quick look several RDBMS simply lack the necessary functions.
find any proper documentation for mdb2 so i also do not know how to do it with mdb2.
Actually this is probably the bigger issue with MDB2: Its fairly undocumented. The API is a hybrid of the DB and PDO API, but nowhere is it really documented from an end user perspecitive (of course there is full API documentation!). I have a few talks with slides etc.
regards, Lukas