couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Хрусталев Евгений <eugene.khrusta...@gmail.com>
Subject Re: username,password
Date Tue, 08 Oct 2013 11:01:38 GMT
function(doc) {
if(doc.type === "student")
  emit({password: doc.password, name: doc.name}, doc);
}

http://URL/DBname/_design/authentication/_view/name<http://url/DBname/_design/authentication/_view/name>
_of_view?key={"key.password":"123", "name": "key.name"}


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

> Thank you so much Xp,
> I tried also:
> function(doc) {
> if(doc.type === "student")
>   emit([doc.name,doc.password], doc);
> }
>
> http://URL/DBname/_design/authentication/_view/name of
> view?key=["username","password"]
>
>
> and its worked.
>
> But when i tried to do the following :
> function(doc) {
> if(doc.type === "student")
>   emit({password= doc.password, name = doc.name}, doc);
> }
>
> In this case i don't know , how can write a query with Url .
> I tried the following b it its not worked:
> http://URL/DBname/_design/authentication/_view/name of view?name =
> key.name&password=key.password
>
>
> How can i fix that ? please
>
> Best regards
> Ashraf




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

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