[DOCS-13038] Update mongo shell NumberLong examples in extendedJsonv1 page Created: 18/Sep/19  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

Description

If unquoted number, the number passed to NumberLong must be representable as an int64_t

> db.json.insert( { longUnQuoted : NumberLong(922337203685477580) } )
WriteResult({ "nInserted" : 1 })
 
> db.json.insert( { longUnQuoted : NumberLong(9223372036854775807) } )
2019-09-18T13:15:33.613-0400 E QUERY    [js] Error: number passed to NumberLong must be representable as an int64_t :

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Comment by Kevin Adistambha [ 12/Jan/20 ]

Currently the page in https://docs.mongodb.com/manual/core/shell-types/#numberlong says:

The NumberLong() wrapper accepts the long as a string:

Since the NumberLong() constructor also accepts number, it might be less confusing to mentioned this fact as well.

Generated at Thu Feb 08 08:06:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.