incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Prentice <>
Subject using req.query to filter a list function in couchDB 0.10.0
Date Sun, 18 Jul 2010 23:12:02 GMT
I am trying to use a list function to filter the results of a view in my
database. I have developed the following code, but keep getting a reference
error when making a request:

Request = curl -X GET

(param is the name of my list function)

the function looks like this...what I am trying to do is allow someone to
enter the name of the user to filter the view for just rows where the
accessingsystem field = what is entered:

function(head, req)
    var accessingsystem = req.query['as'];
    var row;
    while(row = getRow())
        if (as && row.value[1] != as)

the error i get is {"code":500,"error":"render_error","reason":"function
raised error: ReferenceError: as is not defined"}

any help = much appreciated!

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