Deletes all the  documents using the  pk associated to them.
493711
def delete_documents(self):
    
    pk = str(self._primary_key)
    for doc in self._whoosh.searcher().documents():
      if pk in doc:
        doc_pk = str(doc[pk])
        self._whoosh.delete_by_term(pk, doc_pk)
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));
    }
1139376
public function delete()
    {
        $keys = $this->getList();
        foreach ($keys as $key) {
            $this->entityManager->remove($key);
        }
        $this->entityManager->flush();
    }
551949
void deleteAll() {
        transactionTemplate.execute(new TransactionCallbackWithoutResult() {
            @Override
            protected void doInTransactionWithoutResult(TransactionStatus status) {
                sessionFactory.getCurrentSession().createQuery("DELETE FROM VersionInfo").executeUpdate();
            }
        });
    }
374543
protected function clear(): void
    {
        $this->files = [];
        $this->ofs = new Bigint();
        $this->cdr_ofs = new Bigint();
        $this->opt = new ArchiveOptions();
    }
1200102
public function clear()
    {
        if (!empty($this->files)) {
            $fs = new FileSystem();
            foreach ($this->files as $file) {
                $fs->remove($file);
            }
        }
    }
893454
def delete(self):
        """"""
        self.__class__.objects.filter(pk=self.pk).delete()
23423
@InterfaceAudience.Public
    public void purge() throws CouchbaseLiteException {
        Map<String, List<String>> docsToRevs = new HashMap<String, List<String>>();
        List<String> revs = new ArrayList<String>();
        revs.add("*");
        docsToRevs.put(documentId, revs);
        database.purgeRevisions(docsToRevs);
        database.removeDocumentFromCache(this);
    }
584724
private void cleanup() {

        m_folder1Exclusive = null;
        m_folder2Exclusive = null;
        m_foldersSibling = null;
        m_foldersEqualnames = null;
        m_foldersDifferenttypes = null;
    }
1330216
public void deleteAll() {
        if(trackedFiles.size() == 0) {
            return;
        }

        ArrayList<File> files = new ArrayList<File>(trackedFiles);
        Collections.sort(files, filePathComparator);

        for(File file : files) {
            if(file.exists()) {
                if(!file.delete()) {
                    throw new DataUtilException("Couldn't delete a tracked "
                            + (file.isFile()? "file":"directory" + ": ") + file.getAbsolutePath());
                }
            }
        }

        trackedFiles.clear();
    }
1310493
public function remove_files() {
        $fs = get_file_storage();
        $files = $fs->get_external_files($this->id);
        foreach ($files as $storedfile) {
            $storedfile->delete();
        }
    }
84069
public function removeAll() {
    $storage = $this->entityTypeManager->getStorage('openy_pef_gxp_mapping');

    $query = $storage->getQuery('openy_pef_gxp_mapping');
    $ids = $query->execute();
    if (!$ids) {
      return;
    }

    $this->removeByChunk($ids);
  }
983512
public void removeAll()
    {
        if (m_aCurrentRecord != null)
        {
            for (int index = m_iCurrentRecordStart; index < m_iCurrentRecordEnd; index++)
            {
                int iArrayIndex = this.bufferToArrayIndex(index);
                Object bookmark = m_aCurrentRecord[iArrayIndex];
                if ((bookmark != null) && (bookmark != gEmptyCell))
                    this.freeElement(bookmark);
                m_aCurrentRecord[iArrayIndex] = gEmptyCell;   // No record here
            }
        }
        m_iCurrentRecordStart = 0;      // The first
        m_iCurrentRecordEnd = 0;        // One after the last (Use array nomenclature)
    }
129291
public function delete()
    {
        $app = Application::getFacadeApplication();
        $db = $app->make(Connection::class);
        $db->executeQuery('delete from PermissionKeys where pkID = ?', [$this->getPermissionKeyID()]);
        self::loadAll();
    }
929017
def delete(self):
        """"""
        ret = False
        q = self.query
        pk = self.pk
        if pk:
            pk_name = self.schema.pk.name
            self.query.is_field(pk_name, pk).delete()
            setattr(self, pk_name, None)

            # mark all the fields that still exist as modified
            self.reset_modified()
            for field_name in self.schema.fields:
                if getattr(self, field_name, None) != None:
                    self.modified_fields.add(field_name)

            ret = True

        return ret
1288495
public function deleteAllDocumentTables()
    {
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument || (count($class->parentClassNames) && $class->inheritanceType == ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE)) {
                continue;
            }

            $this->deleteDocumentTableFor($class->name);
        }
    }
281518
public function deleteContent()
  {
    $files = glob($this->folderPath . '*');
    foreach ($files as $file) {
      if (is_file($file)) {
        unlink($file);
      }
    }
  }