Purges the given document id for the document in database. This is more drastic than delete(Document),
it removes all traces of the document. The purge will NOT be replicated to other databases.

@param id the document ID
165818
public void purge(@NonNull String id) throws CouchbaseLiteException {
        if (id == null) { throw new IllegalArgumentException("document id cannot be null."); }

        synchronized (lock) {
            boolean commit = false;
            beginTransaction();
            try {
                getC4Database().purgeDoc(id);
                commit = true;
            }
            catch (LiteCoreException e) {
                throw CBLStatus.convertException(e);
            }
            finally {
                endTransaction(commit);
            }
        }
    }
486624
@Override
    public void delete(String id) throws SQLException {
        Connection c = dataSource.getConnection();
        PreparedStatement p = c.prepareStatement(deleteStatement());
        p.setString(1, id);
        p.execute();


    }
1265000
private void releaseID(int id) {
        ids.removeInt(id);
        nextID = 1;
        for (int i = 0; i < ids.size(); i++) {
            nextID = Math.max(ids.get(i) + 1, nextID);
        }
    }
612020
public synchronized void removeObject(String id) {

        m_cache = null;
        if (m_relativeOrdered) {
            if (m_uniqueIds) {
                Object o = getObject(id);
                Iterator<CmsIdObjectElement<T>> itObjs = m_orderedObjectList.iterator();
                while (itObjs.hasNext()) {
                    CmsIdObjectElement<T> object = itObjs.next();
                    if (object.getObject() == o) {
                        itObjs.remove();
                        break;
                    }
                }
                m_objectsById.remove(id);
            } else {
                Iterator<T> itRemove = m_objectsListsById.get(id).iterator();
                while (itRemove.hasNext()) {
                    T o = itRemove.next();
                    Iterator<CmsIdObjectElement<T>> itObjs = m_orderedObjectList.iterator();
                    while (itObjs.hasNext()) {
                        CmsIdObjectElement<T> object = itObjs.next();
                        if (object.getObject() == o) {
                            itObjs.remove();
                            break;
                        }
                    }
                }
                m_orderedObjectList.remove(id);
            }
        } else {
            Object o = getObject(id);
            m_objectList.remove(o);
            if (m_uniqueIds) {
                m_objectsById.remove(id);
            } else {
                m_objectsListsById.remove(id);
            }
        }
    }
88612
public function delete($id)
    {
        if ($this->_mails && isset($this->_mails[$id])) {
            $this->_mails[$id]['is_deleted'] = true;
        }
    }
338812
public void remove(Identity oid)
    {
        if (oid == null) return;

        ObjectCache cache = getCache(oid, null, METHOD_REMOVE);
        if (cache != null)
        {
            cache.remove(oid);
        }
    }
596627
private void removeDoc(String docID) {
    int rmNum = -1;
    int docNum = -1;
    for (int i = 0; i < documents.size(); i++) {
      XComponent xComponent = documents.get(i).getXComponent();
      if (xComponent != null && xComponent.equals(goneContext)) { //  disposed document found
        rmNum = i;
        break;
      }
    }
    if(rmNum < 0) {
      MessageHandler.printToLogFile("Error: Disposed document not found");
      goneContext = null;
    }
    for (int i = 0; i < documents.size(); i++) {
      if (documents.get(i).getDocID().equals(docID)) {  //  document exist
        docNum = i;
        break;
      }
    }
    if(rmNum >= 0 && docNum != rmNum ) {  // don't delete a closed document before the last check is done
      documents.remove(rmNum);
      goneContext = null;
      if (debugMode) {
        MessageHandler.printToLogFile("Document " + rmNum + " deleted");
      }
    }
  }
57700
public function remove($id): void
    {
        $model = $this->repository->get($id);
        $this->repository->remove($model);
    }
542802
@POST
    @Path("close")    
    public void close(String id) {
    	Connection connection = ConnectionHolder.get().get(id);
    	try {
			connection.close();
			ConnectionHolder.get().remove(id);
		} catch (SQLException e) {
			// TODO
			throw new RuntimeException(e);
		}		
    }
939472
@Override
  public void deleteHistoricIdentityLink(String id) {
    if (isHistoryLevelAtLeast(HistoryLevel.AUDIT)) {
      getHistoricIdentityLinkEntityManager().delete(id);
    }
  }
379980
public function clear(int $id)
    {
        unset($this->updates[$id]);
        $this->cache->remove($id);
    }
929198
private Session removeSession(String id) {
        try {
            Session session = sessionCache.delete(id);
            if (session != null) {
                session.beginInvalidate();
                for (int i = sessionListeners.size() - 1; i >= 0; i--) {
                    sessionListeners.get(i).sessionDestroyed(session);
                }
            }
            return session;
        } catch (Exception e) {
            log.warn("Failed to delete session", e);
            return null;
        }
    }
1028322
def delete(self, _id):
        
        mongo_response = yield self.collection.remove({"_id": ObjectId(_id)})

        raise Return(mongo_response)
607966
public void deleteRedirect(int id) {
        try {
            sqlService.executeUpdate("DELETE FROM " + Constants.DB_TABLE_SERVERS +
                                         " WHERE " + Constants.GENERIC_ID + " = " + id + ";");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
297789
public synchronized void delete(File dir, String id) {
        if (idToNumber.remove(id) != null) {
            save(dir);
        }
    }
1205489
public synchronized void purge(short sessionId)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "purge", ""+sessionId);

      // We have to travese the queue and look at all the entries for this
      int[] indexsToDelete = new int[queue.size()];
      int indexCount = 0;
      boolean completeBatchRemoved = false;

      // First build a list of all the items to delete
      for (int x = 0; x < queue.size(); x++)
      {
         QueueData data = queue.get(x);

         // Get the session id. If it matches the one passed in, remove the message
         if (data.getProxyQueue().getId() == sessionId)
         {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Deleting item: " + data);
            indexsToDelete[indexCount++] = x;
            completeBatchRemoved = data.isLastInBatch();
         }
      }

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Removing " + indexCount + " entries");

      // Now perform the deletes in reverse order
      for (int x = (indexCount - 1); x >= 0; x--)
      {
         queue.remove(indexsToDelete[x]);
      }

      // If we removed a complete batch, decrement the counter
      if (completeBatchRemoved) batchesReady--;

      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Purge completed. Queue is now: " + this);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "purge");
   }
471014
public function delete($id)
    {
        if ($id instanceof Zend_Search_Lucene_Search_QueryHit) {
            /* @var $id Zend_Search_Lucene_Search_QueryHit */
            $id = $id->id;
        }

        if ($id >= $this->_docCount) {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Document id is out of the range.');
        }

        $segmentStartId = 0;
        foreach ($this->_segmentInfos as $segmentInfo) {
            if ($segmentStartId + $segmentInfo->count() > $id) {
                break;
            }

            $segmentStartId += $segmentInfo->count();
        }
        $segmentInfo->delete($id - $segmentStartId);

        $this->_hasChanges = true;
    }