couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarrod Roberson <jar...@vertigrated.com>
Subject Re: Strange integer anomaly in Erlang view
Date Tue, 11 May 2010 16:37:37 GMT
On Tue, May 11, 2010 at 10:55 AM, Mike Keen <mk@visiture.com> wrote:

> I'd say there's a good reason to store it as a number, if I want to be able
> to sort on that field. But, even if you could make the case that this
> particular value should be stored as a string, shouldn't we be able to
> expect data stored as an integer to be able to be retrieved accurately?
>
> Mike
>
> format the number with leading ZERO's and it will sort correctly. And no,
read the comments on that bug report, some numbers don't convert in
JavaScript correctly because of precision problems in SpiderMonkey. I did a
good bit of testing with trying to store currentTimeMilliseconds from Java
and some would not be translated by the JavaScript view engine correctly.
The only way to be sure was to store them as strings and convert in
non-JavaScript code.

-- 
Jarrod Roberson

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message