ali-sdk / ali-rds

Aliyun RDS client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

这里为啥跳过了

shepherdwind opened this issue · comments

commented

ali-rds/lib/operator.js

Lines 163 to 166 in 004713c

if (column in options.where) {
continue;
}
sets.push('?? = ?');

比如

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'