Repository navigation
Support $objectToArray - #723
Conversation
|
Starting the review. For reference the spec is here. |
pcorpet
left a comment
There was a problem hiding this comment.
Thanks for jumping in and contributing. Please address my comments.
| def _object_to_array_operation(values): | ||
| to_array = [] | ||
|
|
||
| # Use predictable key order to be testable more easily |
There was a problem hiding this comment.
Please add a test and handle the case where the arg is not a dict
|
Thank you for your quick reply and review. |
|
You can rebase, I've fixed the CI pipeline |
45ee9b4 to
3c3fe72
Compare
|
Wait, why was it closed? I rebased and changed my feature quite a lot, this time taking a lot of inspiration from the Let me know what you think! |
|
Thanks for the changes! |
|
@pcorpet Thanks for your time and help! I'm seeing that there is still an issue with the order of the dicts in some Python versions (which breaks CI in |
As I was tinkering with an aggregate pipeline I found while looking for different ways of getting all properties within a collection, I noticed my tests were failing because
mongomockdoesn't support$objectToArrayyet.I tried to implement the function, but I wasn't 100% sure where to put it and how to properly test it.
So please, see this more of a draft or proposal. I will work on it further, but if you like my approach and can nudge me in the right direction, I'd be glad to contribute!
Oh, also, I didn't branch off the latest
developbut of the last commit that was not failing, hope this is alright!