X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fdb%2FDatabaseOracle.php;h=90fabaf5c4383f15a2a2093e456b5448e5b35610;hp=556fe755476229c86cd493302be88407c61624a1;hb=74426f3cf796b149f1ae445e41815bbe148640b2;hpb=bc28fc4c4844a536288a26b514a12d6ed8d6860c diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 556fe75547..90fabaf5c4 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -37,9 +37,6 @@ class DatabaseOracle extends Database { /** @var int The number of rows affected as an integer */ protected $mAffectedRows; - /** @var int */ - private $mInsertId = null; - /** @var bool */ private $ignoreDupValOnIndex = false; @@ -319,12 +316,10 @@ class DatabaseOracle extends Database { return oci_field_name( $stmt, $n ); } - /** - * This must be called after nextSequenceVal - * @return null|int - */ function insertId() { - return $this->mInsertId; + $res = $this->query( "SELECT lastval_pkg.getLastval FROM dual" ); + $row = $this->fetchRow( $res ); + return is_null( $row[0] ) ? null : (int)$row[0]; } /** @@ -359,7 +354,7 @@ class DatabaseOracle extends Database { return $e['code']; } - function affectedRows() { + protected function fetchAffectedRowCount() { return $this->mAffectedRows; } @@ -649,20 +644,6 @@ class DatabaseOracle extends Database { return preg_replace( '/.*\.(.*)/', '$1', $name ); } - /** - * Return the next in a sequence, save the value for retrieval via insertId() - * - * @param string $seqName - * @return null|int - */ - function nextSequenceValue( $seqName ) { - $res = $this->query( "SELECT $seqName.nextval FROM dual" ); - $row = $this->fetchRow( $res ); - $this->mInsertId = $row[0]; - - return $this->mInsertId; - } - /** * Return sequence_name if table has a sequence *