'Copies rows from the given db into the output file then deletes them.'

def _FlushAllRows(self, db_connection, table_name):

    for sql in db_connection.iterdump():
        sql = utils.SmartStr(sql)
        if (sql.startswith('CREATE    TABLE') or sql.startswith('BEGIN    TRANSACTION') or sql.startswith('COMMIT')):
            continue
        (yield self.archive_generator.WriteFileChunk((sql + '\n')))
    with db_connection:
        db_connection.cursor().execute(('DELETE    FROM    "%s";' % table_name))
