(self)
return str(tb)
Return full version of query history
Return full version of query history
Return full version of query history
def full_history(self):
        """Return full version of query history"""
        tb = pt.PrettyTable()
        # tb.set_style(pt.MSWORD_FRIENDLY)
        for query_ind in range(len(self._query_history)):
            query_result = self._query_history[query_ind]
            tb.add_column(str(query_ind), ["query_index:%s\nresponse:%s\ncost:%s" % (
                          str(query_result[1]), str(query_result[0][0]), str(query_result[0][1]))])
        tb.add_column('in all', ["number_of_queries:%s\ncost:%s" % (str(len(self._query_history)), str(self.cost_inall))])
        return str(tb)
def full_history ( self ) : tb = pt . PrettyTable ( ) # tb.set_style(pt.MSWORD_FRIENDLY) for query_ind in range ( len ( self . _query_history ) ) : query_result = self . _query_history [ query_ind ] tb . add_column ( str ( query_ind ) , [ "query_index:%s\nresponse:%s\ncost:%s" % ( str ( query_result [ 1 ] ) , str ( query_result [ 0 ] [ 0 ] ) , str ( query_result [ 0 ] [ 1 ] ) ) ] ) tb . add_column ( 'in all' , [ "number_of_queries:%s\ncost:%s" % ( str ( len ( self . _query_history ) ) , str ( self . cost_inall ) ) ] ) return str ( tb )