Removed random @throws tag from a subclass while at it
Change-Id: I1cad1f66b62bb4a306feb5c773ed5556891f82a7
return $this->trxLevel ? OCI_NO_AUTO_COMMIT : OCI_COMMIT_ON_SUCCESS;
}
return $this->trxLevel ? OCI_NO_AUTO_COMMIT : OCI_COMMIT_ON_SUCCESS;
}
+ /**
+ * @param string $sql
+ * @return bool|mixed|ORAResult
+ */
protected function doQuery( $sql ) {
wfDebug( "SQL: [$sql]\n" );
if ( !StringUtils::isUtf8( $sql ) ) {
protected function doQuery( $sql ) {
wfDebug( "SQL: [$sql]\n" );
if ( !StringUtils::isUtf8( $sql ) ) {
- * Run a query and return a DBMS-dependent wrapper (that has all IResultWrapper methods)
+ * Run a query and return a DBMS-dependent wrapper or boolean
- * This might return things, such as mysqli_result, that do not formally implement
- * IResultWrapper, but nonetheless implement all of its methods correctly
+ * For SELECT queries, this returns either:
+ * - a) A driver-specific value/resource, only on success. This can be iterated
+ * over by calling fetchObject()/fetchRow() until there are no more rows.
+ * Alternatively, the result can be passed to resultObject() to obtain a
+ * ResultWrapper instance which can then be iterated over via "foreach".
+ * - b) False, on any query failure
- * @param string $sql SQL query.
- * @return IResultWrapper|bool Iterator to feed to fetchObject/fetchRow; false on failure
+ * For non-SELECT queries, this returns either:
+ * - a) A driver-specific value/resource, only on success
+ * - b) True, only on success (e.g. no meaningful result other than "OK")
+ * - c) False, on any query failure
+ *
+ * @param string $sql SQL query
+ * @return mixed|bool An object, resource, or true on success; false on failure
*/
abstract protected function doQuery( $sql );
*/
abstract protected function doQuery( $sql );
/**
* @param string $sql
* @return bool|MssqlResultWrapper|resource
/**
* @param string $sql
* @return bool|MssqlResultWrapper|resource
- * @throws DBUnexpectedError
*/
protected function doQuery( $sql ) {
// several extensions seem to think that all databases support limits
*/
protected function doQuery( $sql ) {
// several extensions seem to think that all databases support limits
class DatabaseMysqli extends DatabaseMysqlBase {
/**
* @param string $sql
class DatabaseMysqli extends DatabaseMysqlBase {
/**
* @param string $sql
- * @return mysqli_result
+ * @return mysqli_result|bool
*/
protected function doQuery( $sql ) {
$conn = $this->getBindingHandle();
*/
protected function doQuery( $sql ) {
$conn = $this->getBindingHandle();
!preg_match( '/^SELECT\s+pg_(try_|)advisory_\w+\(/', $sql );
}
!preg_match( '/^SELECT\s+pg_(try_|)advisory_\w+\(/', $sql );
}
+ /**
+ * @param string $sql
+ * @return bool|mixed|resource
+ */
public function doQuery( $sql ) {
$conn = $this->getBindingHandle();
public function doQuery( $sql ) {
$conn = $this->getBindingHandle();