public function prepare($sql)
    {
        return $this->getDisconnectRetry()->run(function () use ($sql) {
            $statement = $this->_driver->prepare($sql);

            if ($this->_logQueries) {
                $statement = $this->_newLogger($statement);
            }

            return $statement;
        });
    }
public function prepare($sql)
    {
        return $this->getDisconnectRetry()->run(function () use ($sql) {
            $statement = $this->_driver->prepare($sql);

            if ($this->_logQueries) {
                $statement = $this->_newLogger($statement);
            }

            return $statement;
        });
    }
public function prepare ( $ sql ) { return $ this -> getDisconnectRetry ( ) -> run ( function ( ) use ( $ sql ) { $ statement = $ this -> _driver -> prepare ( $ sql ) ; if ( $ this -> _logQueries ) { $ statement = $ this -> _newLogger ( $ statement ) ; } return $ statement ; } ) ; }
Prepares a SQL statement to be executed.

@param string|\Cake\Database\Query $sql The SQL to convert into a prepared statement.
@return \Cake\Database\StatementInterface
Prepares a SQL statement to be executed .