Pass parameters to view with restful


#1

hello experts,
i tried to run View with Restful command, if i defined view like below

function(doc,meta,FAccount){
  if (doc.From_Account==FAccount){
    emit(meta.id, parseInt(doc.deposit));
  }

}

or like below:

function (doc, meta,FAccount,TAccount) {
  if (doc.From_Account==FAccount && doc.To_Account==TAccount){
    emit(meta.id, parseInt(doc.deposit));
  }
}

how can i touch them? like

curl -u Administrator:password -X GET http://IP:8092/default/_design/dev_Test/_view/Test?...

Why I need them? Because I’d like to have aggregate of “deposit” parameters.

Thanks.


#2

hi
finally, i found my answer.N1QL to View Code