Public Member Functions | |
| __construct ($connection) | |
| Constructor. | |
| commit () | |
| Commit transaction. | |
| rollback ($savepoint=false) | |
| Rollback transaction. | |
| savepoint ($savepoint) | |
| Create rollback savepoint. | |
Definition at line 15 of file oracleTransaction.php.
| __construct | ( | $ | connection | ) |
Constructor.
public
| mixed | $connection |
Definition at line 39 of file oracleTransaction.php.
{
$this->objConnection = $connection;
}
| commit | ( | ) |
Commit transaction.
public
Definition at line 50 of file oracleTransaction.php.
{
return oci_commit( $this->objConnection );
}
| rollback | ( | $ | savepoint = false |
) |
Rollback transaction.
public
| str | $savepoint |
Definition at line 62 of file oracleTransaction.php.
{
if ( !$savepoint )
{
return oci_rollback( $this->objConnection );
}
else
{
$objParse = oci_parse( $this->objConnection, 'ROLLBACK TO ' . $savepoint );
if ( !$objParse )
{
$objError = oci_error( $this->objConnection );
trigger_error( $objError['message'], E_USER_WARNING );
}
$objStmt = oci_execute( $objParse, OCI_DEFAULT );
if ( !$objStmt )
{
$objError = oci_error( $objParse );
trigger_error( $objError['message'], E_USER_WARNING );
}
return $objStmt;
}
}
| savepoint | ( | $ | savepoint | ) |
Create rollback savepoint.
public
| str | $savepoint |
Definition at line 97 of file oracleTransaction.php.
{
$objParse = oci_parse( $this->objConnection, 'SAVEPOINT ' . $savepoint );
if ( !$objParse )
{
$objError = oci_error( $this->objConnection );
trigger_error( $objError['message'], E_USER_WARNING );
}
$objStmt = oci_execute( $objParse, OCI_DEFAULT );
if ( !$objStmt )
{
$objError = oci_error( $this->objConnection );
trigger_error( $objError['message'], E_USER_WARNING );
}
return $objStmt;
}
1.7.1