[RCBC-76] Provide get and lock as API Created: 24/Aug/12  Updated: 11/Sep/12  Resolved: 27/Aug/12

Status: Closed
Project: Couchbase Ruby client library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2.0.z.beta
Security Level: Public

Type: Improvement Priority: Major
Reporter: kzeller Assignee: kzeller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
Provide get and lock as an API method.

 Comments   
Comment by Sergey Avseyev [ 24/Aug/12 ]
Couchbase::Bucket#get has option lock, so the get with this option is the "get and lock", see examples at

http://rdoc.info/github/couchbase/couchbase-ruby-client/Couchbase/Bucket#get-instance_method

and also implementation and tests

https://github.com/couchbase/couchbase-ruby-client/blob/13ca5c6bed/ext/couchbase_ext/couchbase_ext.c#L3078

https://github.com/couchbase/couchbase-ruby-client/blob/13ca5c6bed/test/test_get.rb#L349-L397
Comment by kzeller [ 27/Aug/12 ]
Will add to docs.
Comment by kzeller [ 27/Aug/12 ]
Added to 1.8 and will add to 2.0 chapters.
Comment by kzeller [ 27/Aug/12 ]
Do you have any examples in a reference app?
Generated at Mon Sep 22 07:11:24 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.