RE: pdo design

From: Date: Sat, 22 May 2004 15:50:52 +0000
Subject: RE: pdo design
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-10027@lists.php.net to get a copy of this message
Hey Ard, When you say database, do you mean separate database connection, or separate named databases on the same connection? PDO::beginTransaction() initiates a transaction for a given connection ($dbh) in a more or less portable way. You're not always guaranteed to be able to do that; extending it for multiple database handles seems a bit optimistic :) Could you expand on what Firebird does here? Are there other DB's that support this too? --Wez. > -----Original Message----- > From: Ard Biesheuvel [mailto:a.k.biesheuvel@ewi.tudelft.nl] > Sent: 22 May 2004 16:39 > To: internals@lists.php.net > Cc: helly@php.net; ilia@prohost.org; wez@thebrainroom.net; > george@omniti.com > Subject: pdo design > > Guys, > > I saw the alpha of PDO on pecl. I was wondering if we could > discuss the > design of it a bit more before putting too much work into it. > > In particular, the way transactions are represented is not very > practical. Generally, databases that support transactions > will support > multiple concurrent transactions against the same database. Firebird > also supports transactions against multiple databases. [which > does *not* > mean you can join tables from different DBs, it just means ACID over > multiple DBs] > > This means that in some cases you must specify both the > connection and > the transaction when generating a statement. [I'm not sure if others > RDBMSs support this, but it might be something we will see > more in the > future.] > > In short: > > In addition to $db->startTransaction(), maybe we could add > PDO::startTransaction($db1 [,$db2 [,$db3]]). > > In addition to $db->prepare(), maybe we could add a Transaction > interface whose instances would allow being called as > > $trans->prepare($query) > > and maybe even > > $trans->prepare($db, $query) > > > Your thoughts please ? > > -- > Ard > > >

« previous php.internals (#10027) next »