Removes a document from this collection. This will raise AssertionError if the
        document does not have an _id attribute
542302
def remove(self, document):
        
        assert '_id' in document, 'Document must have an id'
        self.db.execute("delete from %s where id = ?" % self.name, (document['_id'],))
1177763
function(ev, model, collection, options) {
      if ((ev === 'add' || ev === 'remove') && collection !== this) {
        return;
      }
      if (ev === 'destroy') {
        this.remove(model, options);
      }
      if (model && ev === 'change:objectId') {
        delete this._byId[model.previous("objectId")];
        this._byId[model.id] = model;
      }
      this.trigger.apply(this, arguments);
    }
1266133
def delete(self, _key) :
        ""
        try :
            doc = self.cacheStore[_key]
            doc.prev.nextDoc = doc.nextDoc
            doc.nextDoc.prev = doc.prev
            del(self.cacheStore[_key])
        except KeyError :
            raise KeyError("Document with _key %s is not available in cache" % _key)
248282
def delete_one(self, id_):
                
        url = "https://api.knackhq.com/v1/objects/%s/records/%s" % (
            self.key, id_)
        res = self.delete(url)
        return res
1257486
def remove(self, document_id, namespace, timestamp):
        
        try:
            entry = self.doc_dict[document_id]
            entry.doc = None
            entry.update(namespace, timestamp)
        except KeyError:
            raise OperationFailed("Document does not exist: %s" % document_id)
1138681
def destroy(update_collection=true)
      return if new_record?
      previous_name = name_changed? ? name_was : name
      parent.modify_engine do |nat|
        nat.remove_redirect(previous_name)
      end
      parent_collection.delete(self, true) if parent_collection && update_collection
      new_record!
      true
    end
1210006
def _deleteObject(self, xref):
        """"""
        if self.isClosed:
            raise ValueError("operation illegal for closed doc")

        return _fitz.Document__deleteObject(self, xref)
93958
public WriteResult<T, K> removeById(K id) throws MongoException {
        return new WriteResult<T, K>(this, dbCollection.remove(createIdQuery(id)));
    }
1214582
def delete_object!(objectID, request_options = {})
      res = delete_object(objectID, request_options)
      wait_task(res['taskID'], WAIT_TASK_DEFAULT_TIME_BEFORE_RETRY, request_options)
      res
    end
371932
async def delete(self, _id=None):
		
		if not _id:
			return {"error":400, 
					"reason":"Missed required fields"}

		document = await self.collection.find_one({"id": _id})

		if not document:
			return {"error":404, 
					"reason":"Not found"}

		deleted_count = await self.collection.delete_one(
							{"id": _id}).deleted_count

		return deleted_count
1011757
public function delete()
    {
        if (!$this->isLoaded()) {
            //Nothing to do, do we need an exception here?
            return;
        }

        $this->dispatch('delete', new DocumentEvent($this));

        //Performing deletion
        $this->odm->collection(static::class)->deleteOne(['_id' => $this->primaryKey()]);
        $this->setField('_id', null, false);
        //Done with deletion

        $this->dispatch('deleted', new DocumentEvent($this));
    }
979420
def delete_many(cls, documents):
        """"""

        # Ensure all documents have been converted to frames
        frames = cls._ensure_frames(documents)

        all_count = len(documents)
        assert len([f for f in frames if '_id' in f._document]) == all_count, \
                "Can't delete documents without `_id`s"

        # Send delete signal
        signal('delete').send(cls, frames=frames)

        # Prepare the documents to be deleted
        ids = [f._id for f in frames]

        # Delete the documents
        cls.get_collection().delete_many({'_id': {'$in': ids}})

        # Send deleted signal
        signal('deleted').send(cls, frames=frames)
21646
def delete(self):
        
        # Delete each field
        for field_name in self._fields:
            field = self.get_field(field_name)
            if not isinstance(field, PKField):
                # pk has no stored key
                field.delete()
        # Remove the pk from the model collection
        self.connection.srem(self.get_field('pk').collection_key, self._pk)
        # Deactivate the instance
        delattr(self, "_pk")
523659
def delete(self, docids):
        """"""
        logger.debug("deleting %i documents from %s" % (len(docids), self))
        deleted = 0
        for docid in docids:
            try:
                del self.id2pos[docid]
                deleted += 1
                del self.id2sims[docid]
            except:
                pass
        self.id2sims.sync()
        if deleted:
            logger.info("deleted %i documents from %s" % (deleted, self))
        self.update_mappings()
257365
def remove(self):

        ''' 
            
        '''

        _title = '%s.remove' % self.__class__.__name__

    # TODO  error handling is turned off to avoid system blocking
    #       fix potential to create artifacts in the system

    # remove collection tree
        try:
            import shutil
            shutil.rmtree(self.collection_folder, ignore_errors=True)
        except:
            raise Exception('%s failed to remove %s collection from app data.' % (_title, self.collection_folder))

        exit_msg = '%s collection has been removed from app data.' % self.collection_folder
        return exit_msg
398888
def delete_token(self):
        
        try:
            self.doc_ref.delete()
        except Exception as e:
            log.error('Could not delete the token (key: {}): {}'.format(self.doc_id, str(e)))
            return False
        return True
895182
def delete(self, rid, raise_on_error=True):
        
        return self.ds.delete(rid, raise_on_error)