use Wikimedia\Rdbms\DatabaseDomain;
use Wikimedia\Rdbms\Blob;
use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IResultWrapper;
use Wikimedia\Rdbms\DBConnectionError;
use Wikimedia\Rdbms\DBUnexpectedError;
use Wikimedia\Rdbms\DBExpectedError;
$this->keywordTableMap = $params['keywordTableMap'] ?? [];
$params['tablePrefix'] = strtoupper( $params['tablePrefix'] );
parent::__construct( $params );
- Hooks::run( 'DatabaseOraclePostInit', [ $this ] );
}
function __destruct() {
/**
* Frees resources associated with the LOB descriptor
- * @param ResultWrapper|ORAResult $res
+ * @param IResultWrapper|ORAResult $res
*/
function freeResult( $res ) {
if ( $res instanceof ResultWrapper ) {
}
/**
- * @param ResultWrapper|ORAResult $res
- * @return mixed
+ * @param IResultWrapper|ORAResult $res
+ * @return stdClass|bool
*/
function fetchObject( $res ) {
if ( $res instanceof ResultWrapper ) {
}
/**
- * @param ResultWrapper|ORAResult $res
- * @return mixed
+ * @param IResultWrapper|ORAResult $res
+ * @return stdClass|bool
*/
function fetchRow( $res ) {
if ( $res instanceof ResultWrapper ) {
}
/**
- * @param ResultWrapper|ORAResult $res
+ * @param IResultWrapper|ORAResult $res
* @return int
*/
function numRows( $res ) {
}
/**
- * @param ResultWrapper|ORAResult $res
+ * @param IResultWrapper|ORAResult $res
* @return int
*/
function numFields( $res ) {
$this->mLastResult = $stmt = oci_parse( $this->conn, $sql );
if ( $stmt === false ) {
$e = oci_error( $this->conn );
- $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ );
+ $this->reportQueryError( $e['message'], $e['code'], $sql, $fname );
return false;
}
$val = $this->getVerifiedUTF8( $val );
if ( oci_bind_by_name( $stmt, ":$col", $val, -1, SQLT_CHR ) === false ) {
$e = oci_error( $stmt );
- $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ );
+ $this->reportQueryError( $e['message'], $e['code'], $sql, $fname );
return false;
}
if ( oci_execute( $stmt, $this->execFlags() ) === false ) {
$e = oci_error( $stmt );
if ( !$this->ignoreDupValOnIndex || $e['code'] != '1' ) {
- $this->reportQueryError( $e['message'], $e['code'], $sql, __METHOD__ );
+ $this->reportQueryError( $e['message'], $e['code'], $sql, $fname );
return false;
} else {
* Return sequence_name if table has a sequence
*
* @param string $table
- * @return bool
+ * @return string[]|bool
*/
private function getSequenceData( $table ) {
if ( $this->sequenceData == null ) {