Chuoke

Results 15 comments of Chuoke

@sctouch I know, it's better if it supported by default i think

Sorry, I can't. The thing is the same URL, repeated requests, subsequent requests the browser uses cached data from disk, and give status code 304, in this case, there is...

Hi, What's the progress? 🤩

示例改了下,之前那个应该是全局查询范围导致的。

大概是这样的,为了数据不会更新出错,当我用了低级的解决方案,如果支持这样用,不是更好, 比如加/减某个字段,我要限制不会超范围: ``` // 关于 $model 的其它逻辑 $model->dec('num')->where('num', '>', 1000)->update(); // 关于 $model 的其它逻辑 ``` 因为存在并发或多个逻辑会对这个字段加/减,所以简单的加了个条件来做限制。

> `update`的方法,应该是`模型类`直接调用的,`模型实例`是不应该调用的,模型实例应该用`save` 其实是支持使用的,只是不是很友好,我改的那个,还没有全面的测试,但是我感觉大差不差了

我现在就是再追加了个 `$model->getWhere()` 条件,虽然感觉有点怪,但是可以解决,整个逻辑阅读起来,比改用Db操作顺畅点。 另外哦,目前发现,`inc` 和 `dec` 方法,如果有自定义的全局查询范围,好像是直接用不了的 (比较忙没有详细测试 😶)。

Note: This was fixed. But the latest version is not v0.13.1 from GitHub releases. You can use `npm pack html5sortable` to download the latest version (v0.13.3) from npm if you...