Loads the record set for this instance.
        
        :param      records | <orb.RecordSet> || <list>

def loadRecords(self, records):
        """
        Loads the record set for this instance.
        
        :param      records | <orb.RecordSet> || <list>
        """
        try:
            if self._running:
                return
            
            self._cancelled = False
            self._running = True
            
            try:
                self.setDatabase(records.database())
            except AttributeError:
                pass
            
            self.startLoading()
            
            # make sure the orb module is loaded, or there is really no point
            if RecordSet is None:
                logger.error('Orb was not loaded.')
            
            # lookup a group of results
            if RecordSet.typecheck(records) and records.groupBy():
                levels = records.groupBy()
                next_levels = levels[1:]
                
                for key, records in records.grouped(levels[0]).items():
                    if self._cancelled:
                        break
                    
                    # PySide Hack! Emitting None across threads will crash Qt
                    #              when in PySide mode.
                    if key == None:
                        key = 'None'
                    
                    self.loadedGroup.emit(key, records, next_levels)
            
            # lookup a list of results, in batched mode
            elif self.isBatched():
                self.loadBatch(records)
                
            # lookup a list of results, not in batched mode
            else:
                records = list(records)
                if self._preloadColumns:
                    for record in curr_records:
                        record.recordValues(self._preloadColumns)
                
                self.loadedRecords[object].emit(records)
            
            self._running = False
            self.finishLoading()
        except ConnectionLostError:
            self.finishLoading()
            self.connectionLost.emit()
        except Interruption:
            self.finishLoading()
        finally:
            self.finishLoading()