'Execute multiple queries
:param querylist: list of queries
:param logTransaction: Boolean to wrap all in one transaction
:param fetchall: Boolean, when using a select query force returning all results
:return: list of results'

def mass_action(self, querylist=None, logTransaction=False, fetchall=False):

    assert hasattr(querylist, u'__iter__'), u'You    passed    a    non-iterable    to    mass_action:    {0!r}'.format(querylist)
    querylist = [i for i in querylist if i]
    sql_results = []
    attempt = 0
    with db_locks[self.filename]:
        self._set_row_factory()
        while (attempt < 5):
            try:
                for qu in querylist:
                    if (len(qu) == 1):
                        if logTransaction:
                            logger.log(qu[0], logger.DEBUG)
                        sql_results.append(self._execute(qu[0], fetchall=fetchall))
                    elif (len(qu) > 1):
                        if logTransaction:
                            logger.log(((qu[0] + u'    with    args    ') + str(qu[1])), logger.DEBUG)
                        sql_results.append(self._execute(qu[0], qu[1], fetchall=fetchall))
                self.connection.commit()
                logger.log(((u'Transaction    with    ' + str(len(querylist))) + u'    queries    executed'), logger.DEBUG)
                break
            except sqlite3.OperationalError as e:
                sql_results = []
                if self.connection:
                    self.connection.rollback()
                if ((u'unable    to    open    database    file' in e.args[0]) or (u'database    is    locked' in e.args[0])):
                    logger.log((u'DB    error:    ' + ex(e)), logger.WARNING)
                    attempt += 1
                    time.sleep(1)
                else:
                    logger.log((u'DB    error:    ' + ex(e)), logger.ERROR)
                    raise
            except sqlite3.DatabaseError as e:
                sql_results = []
                if self.connection:
                    self.connection.rollback()
                logger.log((u'Fatal    error    executing    query:    ' + ex(e)), logger.ERROR)
                raise
        return sql_results
