src/Db/MySqlDb.php
public function delete($tablename, array $where, array $options = []) {
        if (val(Db::OPTION_TRUNCATE, $options)) {
            if (!empty($where)) {
                throw new \InvalidArgumentException("You cannot truncate $tablename with a where filter.", 500);
            }
            $sql = 'truncate table '.$this->backtick($this->px.$tablename);
        } else {
            $sql = 'delete from '.$this->backtick($this->px.$tablename);

            if (!empty($where)) {
                $sql .= "\nwhere ".$this->buildWhere($where);
            }
        }
        return $this->query($sql, Db::QUERY_WRITE);
    }
public function delete($tablename, array $where, array $options = []) {
        if (val(Db::OPTION_TRUNCATE, $options)) {
            if (!empty($where)) {
                throw new \InvalidArgumentException("You cannot truncate $tablename with a where filter.", 500);
            }
            $sql = 'truncate table '.$this->backtick($this->px.$tablename);
        } else {
            $sql = 'delete from '.$this->backtick($this->px.$tablename);

            if (!empty($where)) {
                $sql .= "\nwhere ".$this->buildWhere($where);
            }
        }
        return $this->query($sql, Db::QUERY_WRITE);
    }
{@inheritdoc}