Source for file PropelPDO.php
Documentation is available at PropelPDO.php
* $Id: PropelPDO.php 806 2007-11-15 00:44:47Z david $
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information please see
* <http://propel.phpdb.org>.
* PDO connection subclass that provides some enhanced functionality needed by Propel.
* This class was designed to work around the limitation in PDO where attempting to begin
* a transaction when one has already been begun will trigger a PDOException. Propel
* relies on the ability to create nested transactions, even if the underlying layer
* simply ignores these (because it doesn't support nested transactions).
* The changes that this class makes to the underlying API include the addition of the
* getNestedTransactionDepth() and isInTransaction() and the fact that beginTransaction()
* will no longer throw a PDOException (or trigger an error) if a transaction is already
* @author Cameron Brunner <cameron.brunner@gmail.com>
* @author Hans Lellelid <hans@xmpl.org>
* The current transaction depth.
* Gets the current transaction depth.
* Set the current transaction depth.
* @param int $v The new depth.
* Decrements the current transaction depth by one.
* Increments the current transaction depth by one.
* Is this PDO connection currently in-transaction?
* This is equivalent to asking whether the current nested transaction count
* Overrides PDO::beginTransaction() to prevent errors due to already-in-progress transaction.
$return = parent::beginTransaction();
* Overrides PDO::commit() to only commit the transaction if we are in the outermost
* transaction nesting level.
$return = parent::commit();
* Overrides PDO::rollback() to only rollback the transaction if we are in the outermost
* transaction nesting level.
$return = parent::rollback();
* Overrides PDO::prepare() to add logging.
public function prepare($sql, $driver_options = array())
return parent::prepare($sql, $driver_options);
|