def connect(self, callback, close_callback=None):
        if self.status is not status.CLOSED:
            raise AmqpStatusError('Connection status is %s' % self.status)
        self.status = status.OPENING
        sock = socket.socket()
        sock.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
        self.on_connect = callback
        self.on_disconnect = close_callback
        if TORNADO_1_2:
            self.stream = IOStream(sock, io_loop=self.io_loop)
            self.stream.set_close_callback(self.on_closed_stream)
            self.stream.connect((self.host, self.port), self._handshake)
        else:
            sock.connect((self.host, self.port))
            self.stream = IOStream(sock, io_loop=self.io_loop)
            self.stream.set_close_callback(self.on_closed_stream)
            self._handshake()
Creates the SQL for this query. Returns the SQL string and list of
dataset/ETHPy150Open paolo-losi/stormed-amqp/stormed/connection.py/Connection.connect--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/sql/compiler.py/SQLCompiler.as_sql