mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
PostgreSQL: implemented inTransaction()
This commit is contained in:
@@ -208,6 +208,17 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver, IDibiReflecto
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is in transaction?
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function inTransaction()
|
||||||
|
{
|
||||||
|
return !in_array(pg_transaction_status($this->connection), array(PGSQL_TRANSACTION_UNKNOWN, PGSQL_TRANSACTION_IDLE), TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the connection resource.
|
* Returns the connection resource.
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
Reference in New Issue
Block a user