(self, service_name = None, params = None, **kvargs)
return results
Return collected resultsets and append to the end messages to the users
            Method is called usually as last statement in dbservice to return the results
            Also converts results into desired format
Return collected resultsets and append to the end messages to the users
            Method is called usually as last statement in dbservice to return the results
            Also converts results into desired format
Return collected resultsets and append to the end messages to the users Method is called usually as last statement in dbservice to return the results Also converts results into desired format
def retval(self, service_name = None, params = None, **kvargs):
        """ Return collected resultsets and append to the end messages to the users
            Method is called usually as last statement in dbservice to return the results
            Also converts results into desired format
        """
        params = params or kvargs
        self.raise_if_errors()
        if len( self.messages ):
            self.return_next( self.messages, "_status" )
        if self.sqls is not None and len( self.sqls ):
            self.return_next( self.sqls, "_sql" )
        results = []
        for r in self._retval:
            res_name = r[0]
            rows = r[1]
            res_count = str(len(rows))
            if self._is_test and len(rows) > 0:
                results.append([res_name, res_count, res_name])
                n = 1
                for trow in render_table(rows, rows[0].keys()):
                    results.append([res_name, n, trow])
                    n += 1
            else:
                res_rows = make_record_array(rows)
                results.append([res_name, res_count, res_rows])
        if service_name:
            sql = "select * from %s( {i_context}, {i_params} );" % skytools.quote_fqident(service_name)
            par = dbdict( i_context = self._context, i_params = make_record(params) )
            res = self.run_query( sql, par )
            for r in res:
                results.append((r.res_code, r.res_text, r.res_rows))
        return results
def retval ( self , service_name = None , params = None , * * kvargs ) : params = params or kvargs self . raise_if_errors ( ) if len ( self . messages ) : self . return_next ( self . messages , "_status" ) if self . sqls is not None and len ( self . sqls ) : self . return_next ( self . sqls , "_sql" ) results = [ ] for r in self . _retval : res_name = r [ 0 ] rows = r [ 1 ] res_count = str ( len ( rows ) ) if self . _is_test and len ( rows ) > 0 : results . append ( [ res_name , res_count , res_name ] ) n = 1 for trow in render_table ( rows , rows [ 0 ] . keys ( ) ) : results . append ( [ res_name , n , trow ] ) n += 1 else : res_rows = make_record_array ( rows ) results . append ( [ res_name , res_count , res_rows ] ) if service_name : sql = "select * from %s( {i_context}, {i_params} );" % skytools . quote_fqident ( service_name ) par = dbdict ( i_context = self . _context , i_params = make_record ( params ) ) res = self . run_query ( sql , par ) for r in res : results . append ( ( r . res_code , r . res_text , r . res_rows ) ) return results