On Tue, 26 Oct 2004 09:03:04 +0800, Alan Knowles <[EMAIL PROTECTED]> wrote:
> A few suggestions..
> --------------------------
> Fetching into objects:
> This really needs to be sorted out early on, and kludging support for
> something that perhaps should be the default behavour is looking very messy:
> a) if you want to fetch into a specific class, make that class extend PDO...
> class myobject extends PDO {}

Why place such an arbitrary restriction on data fetching?
Also PDO is definitely the wrong class to use: it's the database
driver, and may be expanded in the future, something that could easily
break peoples scripts.

(this is why allowing people to extend built-in C-coded classes is a bad idea).

> c) other fetch methods can be done by arguments:
> $pdo->fetch(PDO::ARRAY), // standard KEY/VALUE ARRAY
> $pdo->fetch(PDO::VALUES), // just the VALUES
> $pdo->fetch(PDO::SINGLE), // single col. eg. 1 row fetch..
> $pdo->fetch(PDO::NO_CLONE), (fetches into the object - so you have to
> manually clone it.)

Have you actually read my OTN article, blog or conference slides?
All of these features are present, with the exception of fetching into
a named class (or use provided object instance), which is due to go in
anyway.
 
> Bound columns
> Please ditch this for the time being (It's evil ;).. - Jeff's blog backs
> up my impression that this is magic code that should be removed.

No.  I don't tell you how to write code...

> - Bound
> columns for use in updating should really only be done with the result
> object.

They are, although we call it the statement object.
 
> --------------------------
> Connection configuration
> something like:
> PDO::registerConnection("myconnection", "mysql://......"); <- all the
> conneciton option in here... (like persistant / any compatibility stuff
> (like strtolower'ing oracle results..)
> 
> $x = new PDO("myconnection");

We have a php.ini based system for this.  It is not finalized, but is
potentially a lot more useful.
We could also bring in a programmatic interface to it too.
 
> Long term plan? -
> Is it better if the API's for DBDO and PDO slowly merged, where
> feasible.. ? -

DBDO sounds like it does more than PDO.  PDO is intended to be very
light, DBDO seems to have the goal "do anything you could think of
doing with a database".

It doesn't sound like they could be merged.
 
> I've no idea how feasible the query building is in PDO,  - You need two
> facilities

This is not a feature we want in PDO.

Please read http://otn.oracle.com/pub/articles/php_experts/otn_pdo_oracle5.html
for more on the ideas and ideals.

--Wez.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to