'Delete data from database.
``data`` has to contain ``_id`` and ``_rev`` fields.
:param data: data to delete'

def delete(self, data):

    if ((not ('_rev' in data)) or (not ('_id' in data))):
        raise PreconditionsException("Can't    delete    without    _rev    or    _id")
    _id = data['_id']
    _rev = data['_rev']
    try:
        _id = bytes(_id)
        _rev = bytes(_rev)
    except:
        raise PreconditionsException('`_id`    and    `_rev`    must    be    valid    bytes    object')
    data['_deleted'] = True
    self._delete_indexes(_id, _rev, data)
    return True
