Subject: | Inconsistent handling of integers |
Date: | Wed, 28 Apr 2010 17:32:17 +1000 |
To: | bug-MongoDB [...] rt.cpan.org |
From: | Andrew Whatson <whatson [...] gmail.com> |
Hi,
It seems that the handling of numeric values is not quite as-advertised in
the MongoDB documentation. I've attached a perl script that inserts a
variety of test values, and then connects to the database via the mongo shell
to dump the test values as mongo sees them.
The results of running the script indicate that bare integers (ie. unquoted
integer literals, eg. 3) are stored as 'floatApprox' values. Conversely,
integers with arbitrary decimal places (eg. 3.0) are stored as bare integers.
I'm not sure if this is an issue with the driver or the documentation, though
my guess would be the former.
Regards,
Andrew
Message body is not shown because sender requested not to inline it.