As per "MongoDB - The definitive guide",
When I tried to insert a integer, I am getting the following:
> n = {"myInteger" : 3 };
{ "myInteger" : 3 }
> db.num.insert(n);
> n = db.num.find();
{ "_id" : ObjectId("4eeee1e5b593471ba5461577"), "myInteger" : 3 }
Based on the above, I have the following questions:
How do I insert an 8-byte integer into MongoDB through JavaScript?
You can use
n = {"myLong" : new NumberLong("123212313")};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With