Class: Couchbase::Collection::ReplaceOptions

Inherits:
Couchbase::CommonOptions show all
Defined in:
lib/couchbase/collection_options.rb

Instance Attribute Summary collapse

Attributes inherited from Couchbase::CommonOptions

#client_context, #parent_span, #retry_strategy, #timeout

Instance Method Summary collapse

Constructor Details

#initialize {|| ... } ⇒ ReplaceOptions

Returns a new instance of ReplaceOptions.

Yield Parameters:

[View source]

239
240
241
242
243
# File 'lib/couchbase/collection_options.rb', line 239

def initialize
  @transcoder = JsonTranscoder.new
  @durability_level = :none
  yield self if block_given?
end

Instance Attribute Details

#casInteger

Returns Specifies a CAS value that will be taken into account on the server side for optimistic concurrency.

Returns:

  • (Integer)

    Specifies a CAS value that will be taken into account on the server side for optimistic concurrency


233
234
235
# File 'lib/couchbase/collection_options.rb', line 233

def cas
  @cas
end

#durability_level:none, ...

Returns level of durability.

Returns:

  • (:none, :majority, :majority_and_persist_to_active, :persist_to_majority)

    level of durability


236
237
238
# File 'lib/couchbase/collection_options.rb', line 236

def durability_level
  @durability_level
end

#expiryInteger

Returns expiration time to associate with the document.

Returns:

  • (Integer)

    expiration time to associate with the document


227
228
229
# File 'lib/couchbase/collection_options.rb', line 227

def expiry
  @expiry
end

#transcoderJsonTranscoder

Returns transcoder used for encoding.

Returns:


230
231
232
# File 'lib/couchbase/collection_options.rb', line 230

def transcoder
  @transcoder
end