def sql_complete_callback(self, result, query_id, query_start):

        retval = result["retval"]
        data          = result["data"]          if "data"          in result else None
        error_message = result["error_message"] if "error_message" in result else ''
        max_widths    = result["max_widths"]    if "max_widths"    in result else None

        if retval == 0 and data != None:
            util.pretty_print_table(self, data, max_widths=max_widths)

        if retval != 0:
            logging.info("SqlReceiver: (%d:%d) SQL error: %s", self.connection_id, query_id, error_message)
            self.sendLine("SQL error: %s" % error_message)
        else:
            logging.info("SqlReceiver: (%d:%d) SQL completed (%.02f seconds)", self.connection_id, query_id, time.time() - query_start)

        self.nr_queries += 1
        self.factory.nr_queries += 1
        self.sql_statement = ''
Called when a sql statement completes.
dataset/ETHPy150Open MediaMath/qasino/lib/sql_receiver.py/SqlReceiver.sql_complete_callback