|
|
@ -21,6 +21,7 @@ class PDO extends \PDO |
|
|
|
* @param string|null $sequence the sequence name. Defaults to null. |
|
|
|
* @param string|null $sequence the sequence name. Defaults to null. |
|
|
|
* @return int last inserted ID value. |
|
|
|
* @return int last inserted ID value. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
#[\ReturnTypeWillChange] |
|
|
|
public function lastInsertId($sequence = null) |
|
|
|
public function lastInsertId($sequence = null) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return $this->query('SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS bigint)')->fetchColumn(); |
|
|
|
return $this->query('SELECT CAST(COALESCE(SCOPE_IDENTITY(), @@IDENTITY) AS bigint)')->fetchColumn(); |
|
|
@ -31,6 +32,7 @@ class PDO extends \PDO |
|
|
|
* natively support transactions. |
|
|
|
* natively support transactions. |
|
|
|
* @return bool the result of a transaction start. |
|
|
|
* @return bool the result of a transaction start. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
#[\ReturnTypeWillChange] |
|
|
|
public function beginTransaction() |
|
|
|
public function beginTransaction() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->exec('BEGIN TRANSACTION'); |
|
|
|
$this->exec('BEGIN TRANSACTION'); |
|
|
@ -43,6 +45,7 @@ class PDO extends \PDO |
|
|
|
* natively support transactions. |
|
|
|
* natively support transactions. |
|
|
|
* @return bool the result of a transaction commit. |
|
|
|
* @return bool the result of a transaction commit. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
#[\ReturnTypeWillChange] |
|
|
|
public function commit() |
|
|
|
public function commit() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->exec('COMMIT TRANSACTION'); |
|
|
|
$this->exec('COMMIT TRANSACTION'); |
|
|
@ -55,6 +58,7 @@ class PDO extends \PDO |
|
|
|
* natively support transactions. |
|
|
|
* natively support transactions. |
|
|
|
* @return bool the result of a transaction roll back. |
|
|
|
* @return bool the result of a transaction roll back. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
#[\ReturnTypeWillChange] |
|
|
|
public function rollBack() |
|
|
|
public function rollBack() |
|
|
|
{ |
|
|
|
{ |
|
|
|
$this->exec('ROLLBACK TRANSACTION'); |
|
|
|
$this->exec('ROLLBACK TRANSACTION'); |
|
|
@ -71,6 +75,7 @@ class PDO extends \PDO |
|
|
|
* @return mixed A successful call returns the value of the requested PDO attribute. |
|
|
|
* @return mixed A successful call returns the value of the requested PDO attribute. |
|
|
|
* An unsuccessful call returns null. |
|
|
|
* An unsuccessful call returns null. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
#[\ReturnTypeWillChange] |
|
|
|
public function getAttribute($attribute) |
|
|
|
public function getAttribute($attribute) |
|
|
|
{ |
|
|
|
{ |
|
|
|
try { |
|
|
|
try { |
|
|
|