How to implement aggregate in erlang MongoDB driver -


I am trying to use it with the total This is what I have tried so far < Pre> mongo_query: command ({db, angle}, {gross, gt; & gt; pipeline, & lt; & lt; "{$ group: {_ id : {$ Sum: \ "$ id \"}}}, {$ Project: {_id: 0, id: \ "$ id \"}} "> gt; & gt;} wrong).

but I receive this error

  ** exception error: {bad_command, {errmsg, & lt; & Lt; "Exception: Wrong type for field (pipeline) 2! = 4" & gt; & Gt; Code, 13111, OK, 0.0}}   

I am having trouble moving forward and I am looking for any help.

Just to be clear, I am trying to apply it

db.users.aggregate ({$ group: {_ id: "", id: {$ Sum: "$ id"}}}, {$ Project: {_id: 0, id: "$ id"}});

which works in the Mongoody Shell.

I can postpone someone who knows that if someone has cried so far, But there is no one: I think you are supplying a string for the pipeline argument where the driver is expecting a list.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -