loopback-datasource-juggler
loopback-datasource-juggler copied to clipboard
feat: add capability for insert multiple rows in single query
Signed-off-by: Samarpan Bhattacharya [email protected]
Adds new createAll method to support insert multiple rows in single query in memory connector Enables multiInsertSupport in memory connector Adds capability to createAll in dao.js for models to do multiple insert in one query via the supported connectors
Fixes https://github.com/loopbackio/loopback-connector/issues/227 See also https://github.com/loopbackio/loopback-next/issues/3357
Checklist
- [x] Sign off your commits with DCO (Developer Certificate of Origin)
- [x]
npm test
passes on your machine - [x] New tests added or existing tests modified to cover all changes
- [x] Code conforms with the style guide
- [x] Commit messages are following our guidelines
Pull Request Test Coverage Report for Build 3167967406
- 91 of 106 (85.85%) changed or added relevant lines in 2 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.09%) to 84.667%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
lib/connectors/memory.js | 11 | 13 | 84.62% |
lib/dao.js | 80 | 93 | 86.02% |
<!-- | Total: | 91 | 106 |
Totals | |
---|---|
Change from base Build 3155109076: | -0.09% |
Covered Lines: | 7250 |
Relevant Lines: | 8255 |
💛 - Coveralls
Added persistence hooks test cases as well. While adding those, I found some issues, fixed them as well. Please review @dhmlau @achrinza
loopback-connector release is needed before it can be merged. However, this can be reviewed until then.
Updated connector version after rebase.
@raymondfeng @achrinza @dhmlau Please review.
@dhmlau I replied to your comment. Can you please check if I need to change the behaviour ?
@samarpanB, thanks for your response. LGTM. Since I have the "go ahead" from @achrinza as well, I'll be merging this PR. Thanks!