def db_delete_connection(self, connection):
        self.is_dirty = True
        try:
            i = self.db_connections_inverted_id_index[connection._db_id]
        except __HOLE__:
            for i in xrange(len(self._db_connections)):
                if self._db_connections[i]._db_id == connection._db_id:
                    break
        if not self._db_connections[i].is_new:
            self.db_deleted_connections.append(self._db_connections[i])
        # update inverted index because things got pulled back on the _db_connections list
        for conn in self._db_connections[i+1:]:
            self.db_connections_inverted_id_index[conn._db_id] -= 1
        del self._db_connections[i]
        del self.db_connections_id_index[connection._db_id]
        del self.db_connections_inverted_id_index[connection._db_id]
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_9_1/domain/auto_gen.py/DBWorkflow.db_delete_connection