Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multiple rows update #3

Closed
wants to merge 1 commit into from
Closed

support multiple rows update #3

wants to merge 1 commit into from

Conversation

luckydrq
Copy link
Member

add api this.updateRows(table, rows)

ids.push(row.id);
return toArray(row, {excepts: ['id']});
})
.reduce(function(prev, curr) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥会这么复杂实现。。。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按照 http://stackoverflow.com/questions/2528181/update-multiple-rows-with-one-query 的sql写的,测试过程中遇到一些坑。

@fengmk2
Copy link
Member

fengmk2 commented Sep 20, 2015

测试测试测试

@fengmk2
Copy link
Member

fengmk2 commented Sep 20, 2015

最终会生成的 SQL 也在 readme 里面说明一下

@luckydrq
Copy link
Member Author

已更新readme,就是测试案例不知道怎么写? 目前在 内部的一个项目里已使用。

@luckydrq
Copy link
Member Author

这个先关了,重新提一个pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants