cvs: pear /MDB2 MDB2.php
| From: | Lukas Smith | Date: | Sun, 18 Jun 2006 14:30:15 +0000 |
| Subject: | cvs: pear /MDB2 MDB2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-40800@lists.php.net to get a copy of this message | ||
lsmith Sun Jun 18 14:30:15 2006 UTC
Modified files:
/pear/MDB2 MDB2.php
Log:
- added setTransactionIsolation()
- renamed failNestedTransactionIsolationError() to failNestedTransactionIsolation()
http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2.php?r1=1.219&r2=1.220&diff_format=u
Index: pear/MDB2/MDB2.php
diff -u pear/MDB2/MDB2.php:1.219 pear/MDB2/MDB2.php:1.220
--- pear/MDB2/MDB2.php:1.219 Sun Jun 18 13:51:59 2006
+++ pear/MDB2/MDB2.php Sun Jun 18 14:30:15 2006
@@ -43,7 +43,7 @@
// | Author: Lukas Smith <smith@pooteeweet.org> |
// +----------------------------------------------------------------------+
//
-// $Id: MDB2.php,v 1.219 2006/06/18 13:51:59 lsmith Exp $
+// $Id: MDB2.php,v 1.220 2006/06/18 14:30:15 lsmith Exp $
//
/**
@@ -1898,6 +1898,28 @@
}
// }}}
+ // {{{ function setTransactionIsolation()
+
+ /**
+ * Set the transacton isolation level.
+ *
+ * @param string standard isolation level
+ * READ UNCOMMITTED (allows dirty reads)
+ * READ COMMITTED (prevents dirty reads)
+ * REPEATABLE READ (prevents nonrepeatable reads)
+ * SERIALIZABLE (prevents phantom reads)
+ * @return mixed MDB2_OK on success, a MDB2 error on failure
+ *
+ * @access public
+ */
+ function setTransactionIsolation($isolation)
+ {
+ $this->debug('setting transaction isolation level',
'setTransactionIsolation', false);
+ return $this->raiseError(MDB2_ERROR_UNSUPPORTED, null, null,
+ 'setTransactionIsolation: isolation level setting is not supported');
+ }
+ // }}}
+
// {{{ function beginNestedTransaction()
/**
@@ -1941,19 +1963,22 @@
}
// }}}
- // {{{ function failNestedTransactionError()
+ // {{{ function failNestedTransaction()
/**
* Force setting nested transaction to failed.
*
+ * @param mixed value to return in getNestededTransactionError()
* @return bool MDB2_OK
*
* @access public
*/
- function failNestedTransactionError($error = null)
+ function failNestedTransaction($error = null)
{
if (is_null($error)) {
$error = $this->has_transaction_error ? $this->has_transaction_error : true;
+ } elseif (!$error) {
+ $error = true;
}
$this->has_transaction_error = $error;
return MDB2_OK;