src/Service/DB/Select.php
public function delete()
    {
        list($where, $params) = $this->compileWhere();

        // 不允许没有任何条件的delete
        if (!$where) {
            throw new \LogicException('MUST specify WHERE condition before delete');
        }

        // 见方法注释
        if ($this->limit or $this->offset or $this->group_by) {
            throw new \LogicException('CAN NOT DELETE while specify LIMIT or OFFSET or GROUP BY');
        }

        return $this->adapter->delete($this->table, $where, $params);
    }
public function delete()
    {
        list($where, $params) = $this->compileWhere();

        // 不允许没有任何条件的delete
        if (!$where) {
            throw new \LogicException('MUST specify WHERE condition before delete');
        }

        // 见方法注释
        if ($this->limit or $this->offset or $this->group_by) {
            throw new \LogicException('CAN NOT DELETE while specify LIMIT or OFFSET or GROUP BY');
        }

        return $this->adapter->delete($this->table, $where, $params);
    }
根据当前的条件，删除相应的数据.

注意：直接利用select删除数据可能不是你想要的结果
<code>
// 找出符合条件的前5条
// select * from "users" where id > 100 order by create_time desc limit 5
$select = $adapter->select('users')->where('id > ?', 100)->orderBy('create_time desc')->limit(5);

// 因为DELETE语句不支持order by / limit / offset
// 删除符合条件的，不仅仅是前5条
// delete from "users" where id > 100
$select->delete()

// 如果要删除符合条件的前5条
// delete from "users" where id in (select id from "users" where id > 100 order by create_time desc limit 5)
$adapter->select('users')->whereIn('id', $select->setcolumns('id'))->delete();
</code>
这里很容易犯错，考虑是否不提供delete()和update()方法
或者发现定义了limit / offset就抛出异常中止

@return int affected row count