-
Notifications
You must be signed in to change notification settings - Fork 22
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
Some minor improvements #9
base: main
Are you sure you want to change the base?
Conversation
Added support for MinKey and MaxKey in tojson()
Property should not be defined if already existing
Function not needed anymore with mongsh 2.3.1. See https://jira.mongodb.org/browse/MONGOSH-1859
This reverts commit a956e11.
@@ -648,7 +653,7 @@ tojsonObject = function(x, indent, nolint, depth) { | |||
if (typeof DBCollection != 'undefined' && val == DBCollection.prototype) | |||
continue; | |||
|
|||
fieldStrings.push(indent + "\"" + k + "\" : " + tojson(val, indent, nolint, depth + 1)); | |||
fieldStrings.push(indent + k + ": " + tojson(val, indent, nolint, depth + 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks if k
contains non-identifier characters, right? Just checking, this is already a bit broken either way (k
couild probably also contain double quotes or backslashes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was more a change for my personal needs.
I think I reverted it in 7c83f98 - I am not the expert yet with git.
Support for MinKey and MaxKey
Check if property 'str' already exists on ObjectId
Remove function ISODate() for mongosh > 2.31.