private function setDBorSchema($db_name)
    {
        if (strtolower($this->connectionType($db_name)) === 'postgres9') {
            $adapter = $this->getAdapter($this->connectionType($db_name));
            $selectDbQuery = $adapter->useNamedDB($db_name);
            return $this->connections[$db_name]->Execute($selectDbQuery);
        }

        return $this->connections[$db_name]->SelectDB($db_name);
    }
private function setDBorSchema($db_name)
    {
        if (strtolower($this->connectionType($db_name)) === 'postgres9') {
            $adapter = $this->getAdapter($this->connectionType($db_name));
            $selectDbQuery = $adapter->useNamedDB($db_name);
            return $this->connections[$db_name]->Execute($selectDbQuery);
        }

        return $this->connections[$db_name]->SelectDB($db_name);
    }
private function setDBorSchema ( $ db_name ) { if ( strtolower ( $ this -> connectionType ( $ db_name ) ) === 'postgres9' ) { $ adapter = $ this -> getAdapter ( $ this -> connectionType ( $ db_name ) ) ; $ selectDbQuery = $ adapter -> useNamedDB ( $ db_name ) ; return $ this -> connections [ $ db_name ] -> Execute ( $ selectDbQuery ) ; } return $ this -> connections [ $ db_name ] -> SelectDB ( $ db_name ) ; }
Abstraction leaks here. Changing the connection's default DB
or SCHEMA via query works but calling SelectDB on the underying
ADOdb object is sometimes necessary to update the object's
internal state appropriately. This makes postgres a special case
where the SCHEMA should change but DB should not.
Abstraction leaks here . Changing the connection s default DB or SCHEMA via query works but calling SelectDB on the underying ADOdb object is sometimes necessary to update the object s internal state appropriately . This makes postgres a special case where the SCHEMA should change but DB should not .