Возвращает подготовленный DELETE для удаления кэша по ключу
по идентификаторам
@return DeleteBuilder
189859
private function getPreparedDeleteById()
    {
        if (is_null($this->preparedDeleteById)) {
            $this->preparedDeleteById = $this->getServer()
                ->delete($this->tableName)
                ->where()
                ->expr($this->keyColumnName, '=', ':id');
        }

        return $this->preparedDeleteById;
    }
511047
public function deleteAction()
    {
        // Check current user authorization
        if (null !== $response = $this->checkAuth(static::CONTROLLER_CHECK_RESOURCE, Dealer::getModuleCode(),
                AccessManager::DELETE)
        ) {
            return $response;
        }

        $con = Propel::getConnection();
        $con->beginTransaction();
        try {
            // Check token
            $this->getTokenProvider()->checkToken(
                $this->getRequest()->query->get("_token")
            );

            $this->getService()->deleteFromId($this->getRequest()->request->get(static::CONTROLLER_ENTITY_NAME . "_id"));
            $con->commit();
            if ($this->getRequest()->request->get("success_url") == null) {
                return $this->redirectToListTemplate();
            } else {
                return new RedirectResponse(URL::getInstance()->absoluteUrl($this->getRequest()->request->get("success_url")));
            }
        } catch (\Exception $e) {
            $con->rollBack();

            return $this->renderAfterDeleteError($e);
        }
    }
954363
public function delete()
    {
        $table = $this->table;
        $pk = $this->_data[$table->getPrimaryKey()];

        $query = "DELETE FROM {$table->getTableName()} WHERE ";
        $query .= "{$table->getPrimaryKey()} = $pk";

        return $this->_delete($query);
    }
174121
public function deleteAction()
    {
        $entity = $this->loadEntity();
        //TODO: change method to post maybe
        $objectManager = $this->getServiceLocator()->get('Doctrine\ORM\EntityManager');
        $objectManager->remove($entity);
        $objectManager->flush();

        $controller = explode('/', $this->getRequest()->getUri()->getPath())[2];

        if (!$this->getRequest()->isXmlHttpRequest()) {
            return $this->redirect()->toRoute(null, ['controller' => $controller]);
        }
        return;
    }
644261
public function delete()
    {
        if (true === $this->getState()->is('new')) {
            throw new \RuntimeException('You cannot delete a new model');
        }
        if (true === $this->getState()->is('deleted')) {
            return $this;
        }
        $this->getState()->setDeleting();
        return $this;
    }
195161
public function deleteAll()
    {
        $this->preDeleteAll();
        $result = $this->dataStore->deleteAll();

        return $this->postDeleteAll($result);
    }
977572
public function delete()
    {
        if (!$this->hasId()) {
            throw new DeleteException('ID not set - did you call find($id) before delete()?');
        }

        if (!$this->isDeletable()) {
            throw new DeleteException('Permission denied: Entity can not be deleted');
        }

        $this->transactional(function () {
            $this->forceDelete();
        });

        return $this;
    }
909803
public function deleteAction()
	{
		$cntl = $this->createAdmin();

		if( ( $html = $cntl->delete() ) == '' ) {
			return $this->setPsrResponse( $cntl->getView()->response() );
		}

		$this->view->assign( 'content', $html );
	}
925214
public function delete()
	{
		if( $this->item && $this->item->getId() ) {
			\Aimeos\MShop::create( $this->getContext(), 'customer' )->deleteItem( $this->item->getId() );
		}

		return $this;
	}
734688
public function delete()
	{
		$db = \App::get('db');

		if (!is_numeric($this->get('uidNumber')))
		{
			$this->setError("missing required field 'uidNumber'");
			return false;
		}

		$classvars = get_class_vars(__CLASS__);

		$affected = 0;

		foreach ($classvars as $property => $value)
		{
			if ('_auxv_' != substr($property, 0, 6) && '_auxs_' != substr($property, 0, 6))
			{
				continue;
			}

			$property = substr($property, 6);

			$query = "DELETE FROM `#__xprofiles_$property` WHERE uidNumber = " . $db->quote($this->get('uidNumber'));
			$db->setQuery($query);

			if (!$db->query())
			{
				$this->setError("Error deleting from xprofiles $property table: " . $db->getErrorMsg());
			}
			else
			{
				$affected += $db->getAffectedRows();
			}
		}

		$query = "DELETE FROM `#__xprofiles` WHERE uidNumber = " . $db->quote($this->get('uidNumber'));
		$db->setQuery($query);

		if (!$db->query())
		{
			$this->setError("Error deleting from xprofiles table: " . $db->getErrorMsg());
		}
		else
		{
			$affected += $db->getAffectedRows();
		}

		if ($affected > 0)
		{
			Event::trigger('user.onAfterDeleteProfile', array($this));
		}

		$this->clear();

		return true;
	}
1083222
public function delete() {
        $r = DbConnection::getDbConnection()->fetchAll( "select id from dir_data where typ=?", [$this->id] );
        foreach ($r as $f) {
            $c = Catalog::getById($f[0]);
            $c->delete();
        }
        DbConnection::getDbConnection()->executeQuery("drop table ".$this->table);
        DbConnection::getDbConnection()->executeQuery("delete from types where id=".$this->id);
        DbConnection::getDbConnection()->executeQuery("delete from types_fields where id=".$this->id);
        
        // удалить все поля - ссылки на материалы этого типа
        $r = DbConnection::getDbConnection()->fetchAll('SELECT A.field_id, A.name, B.alias FROM types_fields A, types B WHERE A.type=? and A.len=? and A.id=B.id', [FIELD_MATSET, $this->id]);
        foreach ($r as $f) {
            DbConnection::getDbConnection()->executeQuery('DROP TABLE '.$f['alias'].'_'.$alias.'_'.$f['name']);
      	    DbConnection::getDbConnection()->executeQuery('DELETE FROM types_fields WHERE field_id='.$f['field_id']);
        }    
    }
670527
public function delete(): int
    {
        try {
            $query = (clone $this)->setDelete()->apply($this->database->getTablePrefixer());
            $compiled = $this->database->getGrammar()->compileDelete($query);
            return $this->database->delete($compiled->getSQL(), $compiled->getBindings());
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
524334
public function delete(): int
    {
        $deleted = $this->createDeleteBuilder()->execute();

        $this->clearFetchParameters();

        return (int)$deleted;
    }
1190072
public function getDeleteRoute()
    {
        if (null === $this->deleteRoute) {
            $route = rtrim($this->getBaseRoute(), '/') . '/' . $this->getDeleteSuffix();
            $this->setDeleteRoute($route);
        }

        return $this->deleteRoute;
    }
632060
public function delete()
    {
        $this->getUser()->post('source/delete', array('id' => $this->getId()));
        $this->setStatus(self::STATUS_DELETED);

        return $this;
    }
1313132
public function generateDeleteSQL()
        {
            if ($this->sql === null) {
                $this->detectDistinct();
                $this->action = QueryInterface::ACTION_DELETE;
                $sql_generator = new SqlGenerator($this);

                $this->sql = $sql_generator->getDeleteSQL();
            }

            return $this->sql;
        }
415107
public function delete()
        {
            $query = array(
                "DELETE FROM",
                $this->_quoteIdentifier($this->_table_name)
            );

            $this->_addIdColumnConditions($query);

            return self::_execute(join(" ", $query), Arrays::is($this->id(true)) ? array_values($this->id(true)) : array($this->id(true)), $this->_connection_name);
        }