Re: some MDB2 questions

From: Date: Thu, 10 Feb 2005 13:10:54 +0000
Subject: Re: some MDB2 questions
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36119@lists.php.net to get a copy of this message
Andreas Korthaus wrote:
Lukas Smith wrote:
[affectedRows()]
yes, this is inline with ext/pdo is doing it.
What about the API - is it in sync with PDO now? I think PDO API is finished / beta since yesterday, right?
There are still some thing left. Mainly that PDO has a single class for results and prepared statements, option handling, metadata fetching.
But it's nice to check if there is for example only exact one line or no line returned from database.
But you can do the same if you fetch the first 2 rows or the entire result set. For mysql this seems to be a free check, but this is only due to the fact that most people use mysql_query() which actually buffered the entire result set in the client.
What is necessary to use the iterator from Iterator.php (foreach...)?
I still need to work out some issues when making internal fetch calls, but basically you can use: $mdb2->setOption('result_wrap_class', 'MDB2_Iterator'); havent tried this in a while though :-)
But this is only PHP5 compatible. Does it make sense to stay compatible to older PHP-Versions for MDB2? If it becomes stable I think a lot of hosters offer PHP5... (most of the large hosters in germany offer php5 today!). I think most people will use it only for new projects - and these will used php5!
Well I cant magically have iterators work in PHP4. The API is already pretty much iterator compatible. The only thing missing is next() afaik, which I said will be added once bindColumn() is implemented.
[autoExecute() methode for ADOdb]
Err, what exactly do you want changed? Is this a tweaked version of what is there, or does this provide more/less features?
compared to http://cvs.php.net/co.php/pear/MDB2/MDB2/Extended.php?r=1.17#142 I think it is somewhat more efficent, there is no new functionality, I basically replaced the php-loops with c-functions. The function I posted before could replace buildManipSQL() from MDB2.
Personally I dont care for these methods inside MDB2. Which admittedly is the reason I moved them into the extended module since they are too high level for an abstraction layer imho. However if your implementation works just as well functionality-wise I will be happy to add it.
Basically I am just trying to get the fbsql and mssql drivers working. Even if I dont I will make a new release sometime this month.
I'm looking forward to it!
If you know frontbase or mssql feel free to send in patches :-) regards, Lukas

« previous php.pear.dev (#36119) next »