Question

I'm using a Riak database from Node via riak-js. I have two buckets: invites and events. Invites has a link to events. I'd really like to retrieve the invite object and the corresponding event object in one query. To this end, I've tried this:

db.walk("invites", inviteKey, 
[{ bucket: 'events', tag: 'event', keep: true}], 
   function (err, result, meta) { /* ... */ });

But that just gives me the Event corresponding to the invite, it doesn't give me the Invite. I'm guessing the keep attribute is either not meant to go there, or is being ignored for some reason. Is there a way to do this? The Riak-js documentation is difficult.

Was it helpful?

Solution

This is a limitation in Riak link walking rather than in the client library. You can get results from the various link walking steps returned, but not the object you started with.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top