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 ingresTransaction.php.
__construct | ( | $ | connection | ) |
Constructor.
public
mixed | $connection |
Definition at line 39 of file ingresTransaction.php.
{
$this->objConnection = $connection;
//turn autocommit off
ingres_autocommit( $this->objConnection );
}
commit | ( | ) |
Commit transaction.
public
Definition at line 53 of file ingresTransaction.php.
{
return ingres_commit( $this->objConnection );
}
rollback | ( | $ | savepoint = false |
) |
Rollback transaction.
public
str | $savepoint |
Definition at line 65 of file ingresTransaction.php.
{ if ( !$savepoint ) return ingres_rollback( $this->objConnection ); else return ingres_query( 'ROLLBACK TO ' . $savepoint, $this->objConnection ) or trigger_error( ingres_error( $this->objConnection ), E_USER_WARNING ); }
savepoint | ( | $ | savepoint | ) |
Create rollback savepoint.
public
str | $savepoint |
Definition at line 81 of file ingresTransaction.php.
{ return ingres_query( 'SAVEPOINT ' . $savepoint, $this->objConnection ) or trigger_error( ingres_error( $this->objConnection ), E_USER_WARNING ); }