$ctest = 'mediawiki_test_table';
$safeschema = $conn->addIdentifierQuotes( $schema );
if ( $conn->tableExists( $ctest, $schema ) ) {
- $conn->doQuery( "DROP TABLE $safeschema.$ctest" );
+ $conn->query( "DROP TABLE $safeschema.$ctest" );
}
- $res = $conn->doQuery( "CREATE TABLE $safeschema.$ctest(a int)" );
+ $res = $conn->query( "CREATE TABLE $safeschema.$ctest(a int)" );
if ( !$res ) {
$status->fatal( 'config-install-pg-schema-failed',
$this->getVar( 'wgDBuser'), $schema );
}
- $conn->doQuery( "DROP TABLE $safeschema.$ctest" );
+ $conn->query( "DROP TABLE $safeschema.$ctest" );
return $status;
}
$safeuser = $this->db->addQuotes( $wgDBuser );
$SQL = "SELECT array_to_string(useconfig,'*') FROM pg_catalog.pg_user WHERE usename = $safeuser";
- $config = pg_fetch_result( $this->db->doQuery( $SQL ), 0, 0 );
+ $config = pg_fetch_result( $this->db->query( $SQL ), 0, 0 );
$conf = array();
foreach ( explode( '*', $config ) as $c ) {
list( $x, $y ) = explode( '=', $c );
}
$search_path = str_replace( ', ,', ',', $search_path );
if ( array_key_exists( 'search_path', $conf ) === false || $search_path != $conf['search_path'] ) {
- $this->db->doQuery( "ALTER USER $wgDBuser SET search_path = $search_path" );
- $this->db->doQuery( "SET search_path = $search_path" );
+ $this->db->query( "ALTER USER $wgDBuser SET search_path = $search_path" );
+ $this->db->query( "SET search_path = $search_path" );
} else {
$path = $conf['search_path'];
$this->output( "... search_path for user \"$wgDBuser\" looks correct ($path)\n" );
foreach ( $goodconf as $key => $value ) {
if ( !array_key_exists( $key, $conf ) or $conf[$key] !== $value ) {
$this->output( "Setting $key to '$value' for user \"$wgDBuser\"\n" );
- $this->db->doQuery( "ALTER USER $wgDBuser SET $key = '$value'" );
- $this->db->doQuery( "SET $key = '$value'" );
+ $this->db->query( "ALTER USER $wgDBuser SET $key = '$value'" );
+ $this->db->query( "SET $key = '$value'" );
} else {
$this->output( "... default value of \"$key\" is correctly set to \"$value\" for user \"$wgDBuser\"\n" );
}
## We need a separate query here so gin does not complain about empty searches
$SQL = "SELECT to_tsquery($prefix $searchstring)";
- $res = $this->db->doQuery($SQL);
+ $res = $this->db->query($SQL);
if (!$res) {
## TODO: Better output (example to catch: one 'two)
die ("Sorry, that was not a valid search string. Please go back and try again");
$SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN ".
"(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
" ORDER BY rev_text_id DESC OFFSET 1)";
- $this->db->doQuery($SQL);
+ $this->db->query($SQL);
return true;
}