Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10027 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44603 invoked by uid 1010); 22 May 2004 15:50:58 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 44545 invoked from network); 22 May 2004 15:50:58 -0000 Received: from unknown (HELO mx.thebrainroom.net) (65.200.24.98) by pb1.pair.com with SMTP; 22 May 2004 15:50:58 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id E095514880C0; Sat, 22 May 2004 08:50:56 -0700 (PDT) Received: from tron (obsidian.thebrainroom.net [82.133.1.142]) by mx.thebrainroom.net (Postfix) with ESMTP id 40AA9148809B; Sat, 22 May 2004 08:50:53 -0700 (PDT) To: "'Ard Biesheuvel'" , Date: Sat, 22 May 2004 16:50:52 +0100 Organization: The Brain Room Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 In-Reply-To: <40AF7400.7040909@ewi.tudelft.nl> Thread-Index: AcRAEusI7LVtjTgjQg6w/cfKn8uuUAAACZZA Message-ID: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Level: X-TBR-Filter: Virus scanned and defanged Subject: RE: pdo design From: wez@thebrainroom.com ("Wez Furlong") References: <40AF7400.7040909@ewi.tudelft.nl> 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 > > >