couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Prentice <steven.prentice...@gmail.com>
Subject querying an array view with startkey and endkey
Date Thu, 22 Jul 2010 02:13:31 GMT
Hi couchers

say I have the following keys: ["file", "FileA", "folder", "folderA"]
["file", "FileA", "null", "null"] ["file", "FileB", "folder", "folderB"]
I want to use startkey=["file", "FileA"] to find all the fileA documents
regardless of if they have folders or not. But I don't want any FileB's
showing up afterwards!
I can't put endkey=["file", "fileB"] because I am not going to know that
fileB is the next id in the view before I make the request, it could be
anything!

Basically I am looking ot find out how to limit the view to only keys that
start with ["file", "FileA"]. Is there some sort of 'special character' I
could put into endkey or something to do so?

p.s my aim is to not have to make another view that has a smaller key of
["file", "fileID"]

Cheers
Steve

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