Class: Couchbase::Collection::UpsertOptions

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 {|| ... } ⇒ UpsertOptions

Returns a new instance of UpsertOptions.

Yield Parameters:

[View source]

218
219
220
221
222
# File 'lib/couchbase/collection_options.rb', line 218

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

Instance Attribute Details

#durability_level:none, ...

Returns level of durability.

Returns:

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

    level of durability


215
216
217
# File 'lib/couchbase/collection_options.rb', line 215

def durability_level
  @durability_level
end

#expiryInteger

Returns expiration time to associate with the document.

Returns:

  • (Integer)

    expiration time to associate with the document


209
210
211
# File 'lib/couchbase/collection_options.rb', line 209

def expiry
  @expiry
end

#transcoderJsonTranscoder

Returns transcoder used for encoding.

Returns:


212
213
214
# File 'lib/couchbase/collection_options.rb', line 212

def transcoder
  @transcoder
end