[SERVER-2684] special types in shell (e.g. Timestamp) display in variety of ways, and can confuse users Created: 04/Mar/11 Updated: 12/Jul/16 Resolved: 07/Oct/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | None |
| Fix Version/s: | 2.1.0 |
| Type: | Improvement | Priority: | Trivial - P5 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Major Change | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
The way a timestamp prints in the shell is misleading and makes it look like an embedded doc which is not true. If currently prints as: {ts:{t:#, i:#}} But you cannot do this: find( {"ts.t": #}) or this: find({ts: {t:#, i:#}}) ; you must do this find( {ts: new Timestamp(#, #)}) |
| Comments |
| Comment by auto [ 13/Oct/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: - |
| Comment by auto [ 10/Oct/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: - |
| Comment by Antoine Girbal [ 07/Oct/11 ] |
|
ObjectId: DBRef: old tostring: { "$ref" : "test", "$id" : "theid" }new: DBRef("test", "theid") DBPointer: old tostring: DBPointer test:4e8f8ca468249caa40cb1bb9 Timestamp: old tostring: [object Timestamp] BinData: UUID: MD5: HexData: NumberLong: NumberInt: |
| Comment by auto [ 07/Oct/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: - |
| Comment by auto [ 07/Oct/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: - |
| Comment by Antoine Girbal [ 07/Oct/11 ] |
|
Tried to bring some unity and move toString from C++ to common utils.js. ObjectId("4e8f730460beab88c1882f5e") Let me know if the fact that output changed may be a problem for other components. Ideally in the future we will add a method toRealJson() that outputs a true parseable JSON format, same way as Java driver, to fix import/export. |