Delete the model from the database.

@param array|null $options

@return bool|null

@throws \Exception
972874
public function delete($options = [])
    {
        if (is_null($key = $this->getKeyName())) {
            throw new Exception('No primary key defined on model.');
        }

        // If the model doesn't exist, there is nothing to delete so we'll just return
        // immediately and not do anything else. Otherwise, we will continue with a
        // deletion process on the model, firing the proper events, and so forth.
        if (! $this->exists) {
            return;
        }

        if ($this->fireModelEvent('deleting') === false) {
            return false;
        }

        // Here, we'll touch the owning models, verifying these timestamps get updated
        // for the models. This will allow any caching to get broken on the parents
        // by the timestamp. Then we will go ahead and delete the model instance.
        $this->touchOwners();

        static::$client::delete($this->$key, $options, $this->attributes);

        $this->exists = false;

        // Once the model has been deleted, we will fire off the deleted event so that
        // the developers may hook into post-delete operations. We will then return
        // a boolean true as the delete is presumably successful on the database.
        $this->fireModelEvent('deleted', false);

        return true;
    }
1143840
public function delete($conditions, $params = array()){
        return $this->db->builder()->delete($this->table, $conditions, $params);
    }
752248
public function delete(array $options = [])
    {
        $data = [
            '_id' => $this->id
        ];

        $response = $this->security->getKuzzle()->query(
            $this->security->buildQueryArgs($this->deleteActionName),
            $data,
            $options
        );

        return $response['result']['_id'];
    }
943429
public function delete($key, $options = array()) {
        $return= false;
        if ($cache = $this->getCacheProvider($this->getOption(xPDO::OPT_CACHE_KEY, $options), $options)) {
            $return= $cache->delete($key, $options);
        }
        return $return;
    }
904881
public function delete($uri, $body = null, array $options = [])
    {
        return $this->request(self::REQUEST_METHOD_DELETE, $uri, $body, $options);
    }
772359
public function delete($table, $condition = [], array $options = [])
    {
        $query = $this->createQuery('delete', $table, $options)->where($condition);

        return $this->createRequest($query);
    }
869782
public function delete($params)
    {
        if (is_array($params)) {
            if (!empty($params['wheres'])) {
                $wheres = $this->prepareWhere($params['wheres']);
            } else {
                return false;
            }
            $query = "DELETE FROM `{$params['table']}` {$wheres};";
            if (isset($params['debug']) and strtolower($params['debug']) === 'on') {
                var_dump($query);
            }

            return $query;
        } else {
            return false;
        }
    }
1126850
public function delete($handle, array $options = [])
    {
        /** @var AbstractHttpRequest $request */
        $request          = $this->getRequest();
        $request->options = $options;
        $request->path    = $this->client->fullDatabasePath . static::API_PATH . '/' . $handle;
        $request->method  = static::METHOD_DELETE;

        return $this->getReturnObject($request);
    }
741680
public static function Delete ($values, $options = []) {
		if (!static::InTransaction()) {
			throw CoreException::RaiseSystemError('トランザクションが展開されていません。');
		}
		$options += $options + static::GetDefaultOptions();
		return DBI::Delete(static::GetName(), $values, $options);
	}
151110
public function trash(EntityInterface $entity, array $options = [])
    {
        $primaryKey = (array)$this->_table->getPrimaryKey();

        foreach ($primaryKey as $field) {
            if (!$entity->has($field)) {
                throw new RuntimeException();
            }
        }

        foreach ($this->_table->associations() as $association) {
            if ($this->_isRecursable($association, $this->_table)) {
                $association->cascadeDelete($entity, ['_primary' => false] + $options);
            }
        }

        $data = [$this->getTrashField(false) => new Time()];
        $entity->set($data, ['guard' => false]);

        if ($this->_table->save($entity, $options)) {
            return true;
        }

        return false;
    }
1182904
public function delete($url, array $options = [])
    {
        if ($token = $this->fetch('token')) {
            $this->bearer($token);
        }

        if (array_key_exists('delete', $this->methodHeaders)) {
            $this->addHeader('Content-Type', $this->methodHeaders['delete']['content_type']);
            $this->addHeader('Accept', $this->methodHeaders['delete']['accept']);
        }

        try {
            $response = $this->request->delete(sprintf('%s?%s', $this->getRealUrl($url, 'delete'), http_build_query(array_merge([$this->paramKey => $this->apiKey], $options))), [
                'headers' => $this->headers,
            ]);
        } catch (RequestException $e) {
            $response = $e->getResponse();
        }

        return $this->convertToSymfonyResponse($response);
    }
331639
public function remove($criteria = array(), array $options = array())
    {
        if ($criteria) {
            $query = new Query($criteria, $this);
            $query->compress();
            $criteria = $query->compressed;
        }

        return $this->native->remove($criteria, $options);
    }
1004978
public function delete($url, $params = array(), $options = array())
    {
        return $this->request($url, self::DELETE, $params, $options);
    }
1178324
public function delete($index, $type, $id, $options = [])
    {
        return $this->db->delete([$index, $type, $id], $options);
    }
629343
public function delete(EntityInterface $resource, $options = [])
    {
        return (bool)$this->query()->delete()->where([
            $this->getPrimaryKey() => $resource->get($this->getPrimaryKey())
        ])->execute();
    }
1311062
public function delete($table, $data, $keys, $options = []) {
		return $this->object->delete($table, $data, $keys, $options);
	}
697606
public function delete(array $options = [])
    {
        return $this->connection->deleteSession($options + [
            'name' => $this->name(),
            'database' => $this->database
        ]);
    }