Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array of integers #9

Open
benbro opened this issue Feb 19, 2010 · 0 comments
Open

array of integers #9

benbro opened this issue Feb 19, 2010 · 0 comments

Comments

@benbro
Copy link

benbro commented Feb 19, 2010

emonogo turns a list of integers to a binary string. Probably because a string is a list in erlang.
Maybe emongo should except strings only as binaries and list of integer will be a list of integers?

In the shell
db.user.insert({k1: "v1", "k2": [1,2]})
db.user.find()
{ "_id" : ObjectId("4b7e885bf1e7e6a4f6ac5193"), "k1" : "v1", "k2" : [ 1, 2 ] }

With emongo:
emongo:insert(<<"mydb">>, "user", [{"k1", "v1"}, {"k2", [1, 2]}]).
emongo:find(<<"mydb">>, "user").
[[{<<"_id">>,
{oid,<<75,126,137,24,228,24,138,65,245,88,191,247>>}},
{<<"k1">>,<<"v1">>},
{<<"k2">>,<<1,2>>}]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant