function delete($id) { $retId = $this->operator->delete($id); if ($retId) { //todo if here a bug ? $obj[$this->pkey] = $retId; } return $id; }
/** * delete data * * @return int */ public function delete() { if ($this->dynamic === false) { return $this->query->delete(); } $result = $this->query->delete(); if ($this->proxy === true) { $wheres = $this->query->wheres === null ? [] : $this->query->wheres; $this->getProxyManager()->delete($wheres); } return $result; }
/** * Force a delete on a set of soft deleted models. * * @return int */ public function forceDelete() { return $this->query->delete(); }
/** * Delete a record from the database. * * @param null|int $id * * @return int */ public function delete($id = null) { $result = parent::delete($id); $this->handler->setBuilder($this)->setValues([Reflector::PRIMARY_KEY_COLUMN => $id])->setSqlOperation('delete')->invalidateQuery('delete'); return $result; }
public function delete($id = null) { if ($this->needFlushCache()) { // 清空表级缓存 $meta = $this->getMeta(); $meta->flush($this->db(), $this->model->table()); $this->flushAffectingRowCache(); } return parent::delete($id); }
/** * Delete a record from the database. * * @param null|int $id * * @return int */ public function delete($id = null) { $result = parent::delete($id); $this->handler->setBuilder($this)->invalidateQuery(Reflector::QUERY_TYPE_DELETE, [Reflector::PRIMARY_KEY_COLUMN => $id]); return $result; }
function delete($id = null) { return $this->_operator->delete($id); }