'Modify(table, conditions={}, mappings={}) - Modify items in rows matching \'conditions\' using mapping functions in \'mappings\'
* table - the table name
* conditions - a dictionary keyed on column names containing
a condition callable expecting the data string as an
argument and returning a boolean.
* mappings - a dictionary keyed on column names containing a
condition callable expecting the data string as an argument and
returning the new string for that column.'

def Modify(self, table, conditions={}, mappings={}):

    try:
        matching_rowids = self.__Select(table, [], conditions)
        columns = mappings.keys()
        for rowid in matching_rowids.keys():
            txn = None
            try:
                for column in columns:
                    txn = self.env.txn_begin()
                    try:
                        dataitem = self.db.get(_data_key(table, column, rowid), txn=txn)
                        self.db.delete(_data_key(table, column, rowid), txn=txn)
                    except db.DBNotFoundError:
                        dataitem = None
                    dataitem = mappings[column](dataitem)
                    if (dataitem is not None):
                        self.db.put(_data_key(table, column, rowid), dataitem, txn=txn)
                    txn.commit()
                    txn = None
            except:
                if txn:
                    txn.abort()
                raise
    except db.DBError as dberror:
        if (sys.version_info < (2, 6)):
            raise TableDBError, dberror[1]
        else:
            raise TableDBError, dberror.args[1]
