incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryan rasmussen <rasmussen.br...@gmail.com>
Subject Re: suggestions on how to structure a delicious clone
Date Mon, 28 Mar 2011 13:57:04 GMT
If I did that I guess I'd have to have a different view per each user
because views don't have access to the req object since views are
static - correct? Given that I want a userbase of delicious size
(pre-yahoo divestment issue) it does not seem to be optimal.

Actually what I am doing now is having a view with the document ids
and the user ids, and then(theoretically) having a list function that
should get just the ones specific to a user, loading in the actual
document and returning it...

I say theoretically as typeof req is returning undefined, and I'm not
going to be able to get anything in the query object as long as that
is the case :)

Best Regards,
Bryan Rasmussen


On Fri, Mar 25, 2011 at 4:40 PM, Nebu Pookins <nebupookins@gmail.com> wrote:
> On Fri, Mar 25, 2011 at 9:25 AM, bryan rasmussen
> <rasmussen.bryan@gmail.com> wrote:
>>
>> I assumed every bookmark would be a little document consisting of
>> mandatory name, mandatory uri(s) [can be either a string or array],
>> mandatory user id, description, tags
>>
> [...]
>>
>> Also I need to be able to write queries that return a specific users
>> bookmarks. What would be the suggested methodology for that
>
> I'm still new at CouchDB, but it seems to be that the easiest way to
> do that would be to construct a view such that the user id is the key.
> That way you can use the startKey and endKey parameter to isolate a
> specific set of bookmarks belonging to only one user.
>
> - Nebu
>

Mime
View raw message