Select users in couchdb
- by 2x2p1p
Hi guys
I have an HTML form for authentication of users, with SQL language is easier to extract data
select name, password from users where name='nameField' and password='passwordField'
In couchdb I cant use local views just temp views:
curl -X POST -H 'Content-Type: application/json' -d '{"map": "function (doc) {if (doc.name === "nameField" && doc.password === "passwordField") {emit (doc.name, doc.passWord)}}"}' http://localhost:5984/somedb/_temp_view
But it isnt recommended (Click here), what should I do ? :(
Thanks