'Sets a dirty flag for the current thread and code streak. This can be used
to decide in a managed block of code to decide whether there are open
changes waiting for commit.'

def set_dirty(self):

    if (not self.get_autocommit()):
        self._dirty = True
