Change usages of Database:: for function names in DatabaseMssql to DatabaseMssql::
authorSam Reed <reedy@users.mediawiki.org>
Wed, 25 Aug 2010 15:58:58 +0000 (15:58 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 25 Aug 2010 15:58:58 +0000 (15:58 +0000)
includes/db/DatabaseMssql.php

index 1df5ab3..2074020 100644 (file)
@@ -281,7 +281,7 @@ class DatabaseMssql extends DatabaseBase {
         *                                                 (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') )
         * @return Mixed: database result resource (feed to Database::fetchObject or whatever), or false on failure
         */
-       function select( $table, $vars, $conds = '', $fname = 'Database::select', $options = array(), $join_conds = array() )
+       function select( $table, $vars, $conds = '', $fname = 'DatabaseMssql::select', $options = array(), $join_conds = array() )
        {
                $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
                if ( isset( $options['EXPLAIN'] ) ) {
@@ -306,7 +306,7 @@ class DatabaseMssql extends DatabaseBase {
         *                    (e.g. array( 'page' => array('LEFT JOIN','page_latest=rev_id') )
         * @return string, the SQL text
         */
-       function selectSQLText( $table, $vars, $conds = '', $fname = 'Database::select', $options = array(), $join_conds = array() ) {
+       function selectSQLText( $table, $vars, $conds = '', $fname = 'DatabaseMssql::select', $options = array(), $join_conds = array() ) {
                if ( isset( $options['EXPLAIN'] ) ) {
                        unset( $options['EXPLAIN'] );
                }
@@ -320,7 +320,7 @@ class DatabaseMssql extends DatabaseBase {
         * Returns -1 if count cannot be found
         * Takes same arguments as Database::select()
         */
-       function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'Database::estimateRowCount', $options = array() ) {
+       function estimateRowCount( $table, $vars = '*', $conds = '', $fname = 'DatabaseMssql::estimateRowCount', $options = array() ) {
                $options['EXPLAIN'] = true;// http://msdn2.microsoft.com/en-us/library/aa259203.aspx
                $res = $this->select( $table, $vars, $conds, $fname, $options );
                
@@ -337,7 +337,7 @@ class DatabaseMssql extends DatabaseBase {
         * Returns information about an index
         * If errors are explicitly ignored, returns NULL on failure
         */
-       function indexInfo( $table, $index, $fname = 'Database::indexExists' ) {
+       function indexInfo( $table, $index, $fname = 'DatabaseMssql::indexExists' ) {
                # This does not return the same info as MYSQL would, but that's OK because MediaWiki never uses the
                # returned value except to check for the existance of indexes.
                $sql = "sp_helpindex '" . $table . "'";
@@ -376,7 +376,7 @@ class DatabaseMssql extends DatabaseBase {
         * Usually aborts on failure
         * If errors are explicitly ignored, returns success
         */
-       function insert( $table, $arrToInsert, $fname = 'Database::insert', $options = array() ) {
+       function insert( $table, $arrToInsert, $fname = 'DatabaseMssql::insert', $options = array() ) {
                # No rows to insert, easy just return now
                if ( !count( $arrToInsert ) ) {
                        return true;
@@ -507,7 +507,7 @@ class DatabaseMssql extends DatabaseBase {
         * $conds may be "*" to copy the whole table
         * srcTable may be an array of tables.
         */
-       function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'Database::insertSelect',
+       function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = 'DatabaseMssql::insertSelect',
                $insertOptions = array(), $selectOptions = array() )
        {
                $ret = parent::insertSelect( $destTable, $srcTable, $varMap, $conds, $fname, $insertOptions, $selectOptions );
@@ -591,7 +591,7 @@ class DatabaseMssql extends DatabaseBase {
        # It may be more efficient to leave off unique indexes which are unlikely to collide.
        # However if you do this, you run the risk of encountering errors which wouldn't have
        # occurred in MySQL
-       function replace( $table, $uniqueIndexes, $rows, $fname = 'Database::replace' ) {
+       function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseMssql::replace' ) {
                $table = $this->tableName( $table );
 
                if ( count( $rows ) == 0 ) {
@@ -641,9 +641,9 @@ class DatabaseMssql extends DatabaseBase {
        }
 
        # DELETE where the condition is a join
-       function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = "Database::deleteJoin" ) {
+       function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = "DatabaseMssql::deleteJoin" ) {
                if ( !$conds ) {
-                       throw new DBUnexpectedError( $this,  'Database::deleteJoin() called with empty $conds' );
+                       throw new DBUnexpectedError( $this, 'DatabaseMssql::deleteJoin() called with empty $conds' );
                }
 
                $delTable = $this->tableName( $delTable );
@@ -762,7 +762,7 @@ class DatabaseMssql extends DatabaseBase {
        /**
         * Query whether a given column exists in the mediawiki schema
         */
-       function fieldExists( $table, $field, $fname = 'Database::fieldExists' ) {
+       function fieldExists( $table, $field, $fname = 'DatabaseMssql::fieldExists' ) {
                $table = $this->tableName( $table );
                $res = sqlsrv_query( $this->mConn, "SELECT DATA_TYPE FROM INFORMATION_SCHEMA.Columns 
                        WHERE TABLE_NAME = '$table' AND COLUMN_NAME = '$field'" );
@@ -792,7 +792,7 @@ class DatabaseMssql extends DatabaseBase {
        /**
         * Begin a transaction, committing any previously open transaction
         */
-       function begin( $fname = 'Database::begin' ) {
+       function begin( $fname = 'DatabaseMssql::begin' ) {
                sqlsrv_begin_transaction( $this->mConn );
                $this->mTrxLevel = 1;
        }
@@ -800,7 +800,7 @@ class DatabaseMssql extends DatabaseBase {
        /**
         * End a transaction
         */
-       function commit( $fname = 'Database::commit' ) {
+       function commit( $fname = 'DatabaseMssql::commit' ) {
                sqlsrv_commit( $this->mConn );
                $this->mTrxLevel = 0;
        }
@@ -809,7 +809,7 @@ class DatabaseMssql extends DatabaseBase {
         * Rollback a transaction.
         * No-op on non-transactional databases.
         */
-       function rollback( $fname = 'Database::rollback' ) {
+       function rollback( $fname = 'DatabaseMssql::rollback' ) {
                sqlsrv_rollback( $this->mConn );
                $this->mTrxLevel = 0;
        }