protected function buildQuery() { if ($this->statements['FROM']) { unset($this->clauses['DELETE FROM']); } else { unset($this->clauses['DELETE']); } return parent::buildQuery(); }