* @return Array
* @see DatabaseBase::select()
*/
- protected function makeSelectOptions( $options ) {
+ function makeSelectOptions( $options ) {
$preLimitTail = $postLimitTail = '';
$startOpts = '';
* @param $options array
* @return string
*/
- protected function makeInsertOptions( $options ) {
+ function makeInsertOptions( $options ) {
return implode( ' ', $options );
}
* @param $options Array: The options passed to DatabaseBase::update
* @return string
*/
- protected function makeUpdateOptions( $options ) {
+ function makeUpdateOptions( $options ) {
if ( !is_array( $options ) ) {
$options = array( $options );
}
/**
* Take the result from a query, and wrap it in a ResultWrapper if
* necessary. Boolean values are passed through as is, to indicate success
- * of write queries or failure. ResultWrapper objects are also passed
- * through.
+ * of write queries or failure.
+ *
+ * Once upon a time, DatabaseBase::query() returned a bare MySQL result
+ * resource, and it was necessary to call this function to convert it to
+ * a wrapper. Nowadays, raw database objects are never exposed to external
+ * callers, so this is unnecessary in external code. For compatibility with
+ * old code, ResultWrapper objects are passed through unaltered.
*/
- protected function resultObject( $result ) {
+ function resultObject( $result ) {
if ( empty( $result ) ) {
return false;
} elseif ( $result instanceof ResultWrapper ) {
* The DBMS-dependent part of query()
* @param $sql String: SQL query.
* @return object Result object for fetch functions or false on failure
- * @access private
*/
- /*private*/
- public function doQuery( $sql ) {
+ protected function doQuery( $sql ) {
$this->applySchema();
// Needed to handle any UTF-8 encoding issues in the raw sql
return $this->mTrxLevel ? OCI_NO_AUTO_COMMIT : OCI_COMMIT_ON_SUCCESS;
}
- function doQuery( $sql ) {
+ protected function doQuery( $sql ) {
wfDebug( "SQL: [$sql]\n" );
if ( !mb_check_encoding( $sql ) ) {
throw new MWException( "SQL encoding is invalid\n$sql" );