ali-rds icon indicating copy to clipboard operation
ali-rds copied to clipboard

这里为啥跳过了

Open shepherdwind opened this issue 8 years ago • 1 comments

https://github.com/ali-sdk/ali-rds/blob/004713cf9a4aa2da84a9f02348996b1a8ec82430/lib/operator.js#L163-L166

比如

update({ is_read: 1, gmt_modified: 'now()' }, {
  where: { is_read: 0, user_id: 'xxx' },
});

这种情况 转换的 sql 会是

update xxx set gmt_modified = now() where is_read = 0 and user_id = 'xxx'

预期应该是

update xxx set gmt_modified = now(), is_read = 1 where is_read = 0 and user_id = 'xxx'

shepherdwind avatar Sep 01 '17 01:09 shepherdwind

cc @fengmk2 @dead-horse

shepherdwind avatar Sep 01 '17 01:09 shepherdwind