[SERVER-776] way to create long in js Created: 17/Mar/10  Updated: 12/Jul/16  Resolved: 23/Jun/10

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: 1.5.4

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Aaron Staple
Resolution: Done Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-2667 Cannot compare different instances of... Closed
Participants:

 Description   

maybe
new NumberLong( "1111111" )

perhaps should change output as well...

or detect - not sure



 Comments   
Comment by auto [ 23/Jun/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-776 clean precision checking
http://github.com/mongodb/mongo/commit/e881754406b10c1e19b7c33756fbf04b51d73928

Comment by auto [ 23/Jun/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-776 account for null string parsing difference in osx/linux
http://github.com/mongodb/mongo/commit/c00c7d6d93e9408eb09dfe1a9a68e824f0a024f1

Comment by auto [ 22/Jun/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-776 win?
http://github.com/mongodb/mongo/commit/05f319162bf867efc0480290c98f34287a4bb8e3

Comment by auto [ 22/Jun/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-776 win?
http://github.com/mongodb/mongo/commit/0d42eb74d2b152ffa4aae8471d83dc6091954b65

Comment by Aaron Staple [ 22/Jun/10 ]

Ok, the constructor takes either a javascript number (interpreted as a double) or a base 10 string representation. I changed the output format as well. It's NumberLong( <double> ) if that suffices to represent the number, otherwise NumberLong( <stringrep> ).

Comment by auto [ 22/Jun/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-776 NumberLong in v8
http://github.com/mongodb/mongo/commit/1e61dd92e0a096653f976414f8c2ff985f41adc4

Comment by auto [ 22/Jun/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-776 NumberLong in sm
http://github.com/mongodb/mongo/commit/bf36eebd4f32728d4ff0de6cc4a3a3605ab0af1d

Comment by Keith Branton [ 17/Mar/10 ]

There's a big benefit (to me at least) in being able to copy/paste json in the console - so +1 for changing output to match.

Generated at Thu Feb 08 02:55:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.