'Delete(table, conditions) - Delete items matching the given
conditions from the table.
* conditions - a dictionary keyed on column names containing
condition functions expecting the data string as an
argument and returning a boolean.'

def Delete(self, table, conditions={}):

    try:
        matching_rowids = self.__Select(table, [], conditions)
        columns = self.__tablecolumns[table]
        for rowid in matching_rowids.keys():
            txn = None
            try:
                txn = self.env.txn_begin()
                for column in columns:
                    try:
                        self.db.delete(_data_key(table, column, rowid), txn=txn)
                    except db.DBNotFoundError:
                        pass
                try:
                    self.db.delete(_rowid_key(table, rowid), txn=txn)
                except db.DBNotFoundError:
                    pass
                txn.commit()
                txn = None
            except db.DBError as dberror:
                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]
