incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Хрусталев Евгений <eugene.khrusta...@gmail.com>
Subject Re: usrname ppassword
Date Tue, 08 Oct 2013 10:40:29 GMT
Your map function wont be called when you send request to the couchdb.
Couchdb calls it earlier.

Your map function can be:

function(doc) {
  if(doc.type === "student") {
    emit(doc.name + "_" + doc.password, doc)
  }
}

and your request:

http://url/DB name/_design/name of design doc/_view/?key=name_pass


2013/10/8 Ashraf Janan <ashrafjanan@yahoo.com>

> Hi sir,
> I tried to send request to couchDb, to get the id for a user,
> I did the following:
>
> http://url/DB name/_design/name of design
> doc/_view/?studentname=name&password=pass
>
> function(doc) {
> if(doc.type === "student")
>   emit({studentname:name,password:doc.password}, doc);
> }
>
> What is the wrong ?please
>
> Best wishes
> Ashraf




-- 
--
С уважением,
Хрусталев Евгений

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