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

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

            return $statement;
        });
    }
public function query ( $ sql ) { return $ this -> getDisconnectRetry ( ) -> run ( function ( ) use ( $ sql ) { $ statement = $ this -> prepare ( $ sql ) ; $ statement -> execute ( ) ; return $ statement ; } ) ; }
Executes a SQL statement and returns the Statement object as result.

@param string $sql The SQL query to execute.
@return \Cake\Database\StatementInterface
Executes a SQL statement and returns the Statement object as result .