Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document multi-set operation

Change-Id: Idedcf941681c95db99ddf240daa03c70e5f4a79e
Reviewed-on: http://review.couchbase.org/25334
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
  • Loading branch information...
commit f991de85ee927f2d0419129b125a53aad11091f5 1 parent fb0f601
@avsej avsej authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 ext/couchbase_ext/store.c
View
16 ext/couchbase_ext/store.c
@@ -228,6 +228,22 @@ cb_bucket_store(lcb_storage_t cmd, int argc, VALUE *argv, VALUE self)
* @example Store the key which will be expired in 2 seconds using relative TTL.
* c.set("foo", "bar", :ttl => 2)
*
+ * @example Perform multi-set operation. It takes a Hash store its keys/values into the bucket
+ * c.set("foo1" => "bar1", "foo2" => "bar2")
+ * #=> {"foo1" => cas1, "foo2" => cas2}
+ *
+ * @example More advanced multi-set using asynchronous mode
+ * c.run do
+ * # fire and forget
+ * c.set("foo1", "bar1", :ttl => 10)
+ * # receive result into the callback
+ * c.set("foo2", "bar2", :ttl => 10) do |ret|
+ * if ret.success?
+ * puts ret.cas
+ * end
+ * end
+ * end
+ *
* @example Store the key which will be expired in 2 seconds using absolute TTL.
* c.set("foo", "bar", :ttl => Time.now.to_i + 2)
*
Please sign in to comment.
Something went wrong with that request. Please try again.