-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Embedded Shell
-
None
-
1
-
Needed
-
mongosh should insert number as Double by default.
Currently number in mongosh are inserted as int32 if they can be represented as integer and as double otherwise.
ie.
db.coll1.insertOne({ x: 1 });
will result in a bson document like this:
{
_id: 602aa63a5eabf03429d733f1,
x: Int32 { _bsontype: 'Int32', value: 1 }
}
where the old shell would have inserted a Double:
{ _id: 602aa5da098e6ce990139172, x: Double { _bsontype: 'Double', value: 1 } }
- is duplicated by
-
MONGOSH-1032 NumberInt object wrapper is not displayed
- Closed
- is related to
-
MONGOSH-967 Cannot resize oplog via mongosh
- Closed
-
NODE-4948 Spike: Investigate defaulting javascript numbers to doubles in BSON serialize and EJSON stringify
- Blocked
-
NODE-4946 Cast Javascript Number as bsonType: "double"
- Blocked
- related to
-
NODE-3164 Mongo JS Driver Inserting Ints Instead of Doubles
- Closed