emongo icon indicating copy to clipboard operation
emongo copied to clipboard

pushing some integers encodes as string representation of chars

Open steveellis opened this issue 14 years ago • 0 comments

in place updates like this:

emongo:update(pool1, "coll1", [{"key", 1}], [{"$push", [{"f3", 11}, {"f4", 12}]}], true)

return this:

[[{<<"_id">>, {oid,<<75,143,234,245,115,251,145,60,197,30,214,253>>}}, {<<"key">>,1}, {<<"f3">>,{array,"\v"}}, {<<"f4">>,{array,"\f"}}]]

11 is vertical tab and 12 form feed in decimal. Have only seen this with the numbers 11, 12, and 13 (which yields "\r"). So for example, 15 encodes fine as an int. And presumably so do many other numbers.... :)

steveellis avatar Mar 04 '10 17:03 steveellis