Skip to content

Commit

Permalink
pass vclock information back in get/put, relies on Level/levelup#255
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Jun 30, 2014
1 parent 0b11af5 commit d5ca247
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -84,6 +84,7 @@ RiakDOWN.prototype._put = function (key, value, options, callback) {
content_type: options.content_type || 'application/octet-stream',
indexes: indexes
},
return_head: true,
vclock: options.vclock
}, callback);
}
Expand Down Expand Up @@ -112,7 +113,7 @@ RiakDOWN.prototype._get = function (key, options, callback) {
}

if (reply.content.length === 1) {
return callback(null, options.asBuffer === false ? reply.content[0].value.toString() : reply.content[0].value);
return callback(null, options.asBuffer === false ? reply.content[0].value.toString() : reply.content[0].value, { vclock: reply.vclock });
}

newoptions = JSON.parse(JSON.stringify(options)); // ugly clone so we don't modify the original options
Expand Down

0 comments on commit d5ca247

Please sign in to comment.