【更新日志】
* 修正`field`方法`*`兼容问题;* 修正`inc/dec`方法;
* 修正`setInc/setDec`方法;
* 改进`insertAll`方法;
* 改进`parseTime`方法;
* 改进`exp`表达式查询/写入的严谨性;
【升级须知】
由于`5.0.18+`更具严谨性,如果数组查询条件中使用了`exp`查询,必须做出如下调整:// 错误
$where['id'] = ['exp', '>score'];
$model->where($where)->find();
// 正确
$where['id'] = ['exp', Db::raw('>score')];
$model->where($where)->find();
// 正确 推荐写法
$model->whereExp('id', '>score')->find();如果需要使用`exp`表达式更新数据,必须使用`Db::raw()`方法或者`exp`方法。下面用法不再支持:// 错误 不再支持
$data['score'] = ['exp', 'score+1'];
$model->where('id', 1)->update($data);
// 正确
$data['score'] = Db::raw('score+1');
$model->where('id', 1)->update($data);
// 正确 推荐用法
$model->where('id', 1)->exp('score', 'score+1')->update(); 最佳答案