-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix updateAll and deleteAll implementations in all connectors #1167
Comments
Prioritize these connectors: |
@bajtos Should I write unit tests for each connector individually? ie) Add two more unit tests directly to |
No, add your new tests to test/manipulation.test.js. This file is run by all connectors as part of their test suite (or at least it should be) via test/common.batch.js. |
See also https://github.com/strongloop/loopback-datasource-juggler/blob/274a5c778ae0e76403fbb1480c7b144b898c3e18/test/memory.test.js#L404-L427, I am not sure if |
It's ok to add the new tests to |
@bajtos After speaking with @raymondfeng on hangouts, it was decided that we can just modify the second argument (get rid of |
I am not convinced this is not a BC, but I'll go with whatever decision you have made so that we can get this finished ASAP. |
@bajtos Had another meeting with @raymondfeng explaining the BC issue you just mentioned. Gonna update the PostgreSQL connector to return |
@superkhau could you please describe the callback arguments in the documentation explaining how to build a connector? http://docs.strongloop.com/display/LB/Building+a+connector I am not sure if the API documentation in juggler's |
@superkhau for example, updateAll still says that a scalar "count" value is returned: https://github.com/strongloop/loopback-datasource-juggler/blob/e13c0cdc12467aff5f347fa1112c03ba1dcdbb8b/lib/dao.js#L1634 It would be nice to fix the implementation too, it's using a property called What is the final loopback/juggler API that you have arrived at with @raymondfeng? Is the description below correct? MyModel.updateAll -> cb(null, { count: X });
MyModel.deleteAll -> cb(null, { count: X }); |
Based on changes made in #1167 loopbackio/loopback-datasource-juggler#540
I made the changes myself, see loopbackio/loopback-datasource-juggler#540 and #1252 |
Done. |
updateAll
is implemented and return the number of updated records.The text was updated successfully, but these errors were encountered: