src/Connection/Factory.php
protected function prepareConnection(NodeConnectionInterface $connection)
    {
        $parameters = $connection->getParameters();

        if (isset($parameters->password)) {
            $connection->addConnectCommand(
                new RawCommand(array('AUTH', $parameters->password))
            );
        }

        if (isset($parameters->database)) {
            $connection->addConnectCommand(
                new RawCommand(array('SELECT', $parameters->database))
            );
        }
    }
protected function prepareConnection(NodeConnectionInterface $connection)
    {
        $parameters = $connection->getParameters();

        if (isset($parameters->password)) {
            $connection->addConnectCommand(
                new RawCommand(array('AUTH', $parameters->password))
            );
        }

        if (isset($parameters->database)) {
            $connection->addConnectCommand(
                new RawCommand(array('SELECT', $parameters->database))
            );
        }
    }
protected function prepareConnection ( NodeConnectionInterface $ connection ) { $ parameters = $ connection -> getParameters ( ) ; if ( isset ( $ parameters -> password ) ) { $ connection -> addConnectCommand ( new RawCommand ( array ( 'AUTH' , $ parameters -> password ) ) ) ; } if ( isset ( $ parameters -> database ) ) { $ connection -> addConnectCommand ( new RawCommand ( array ( 'SELECT' , $ parameters -> database ) ) ) ; } }
Prepares a connection instance after its initialization.

@param NodeConnectionInterface $connection Connection instance.
Prepares a connection instance after its initialization .