Class: Couchbase::Options::Upsert
- Inherits:
-
Base
- Object
- Base
- Couchbase::Options::Upsert
show all
- Defined in:
- lib/couchbase/options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/options.rb more...
Overview
Instance Attribute Summary collapse
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary
collapse
Constructor Details
#initialize(expiry: nil, transcoder: JsonTranscoder.new, durability_level: :none, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|| ... } ⇒ Upsert
[View source]
535
536
537
538
539
540
541
542
543
544
545
546
547
|
# File 'lib/couchbase/options.rb', line 535
def initialize(expiry: nil,
transcoder: JsonTranscoder.new,
durability_level: :none,
timeout: nil,
retry_strategy: nil,
client_context: nil,
parent_span: nil)
super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span)
@expiry = Utils::Time.(expiry)
@transcoder = transcoder
@durability_level = durability_level
yield self if block_given?
end
|
Instance Attribute Details
#durability_level ⇒ Symbol
509
510
511
|
# File 'lib/couchbase/options.rb', line 509
def durability_level
@durability_level
end
|
#expiry ⇒ Integer, ...
507
508
509
|
# File 'lib/couchbase/options.rb', line 507
def expiry
@expiry
end
|
#transcoder ⇒ JsonTranscoder, #encode(Object)
508
509
510
|
# File 'lib/couchbase/options.rb', line 508
def transcoder
@transcoder
end
|
Instance Method Details
#to_backend ⇒ Object
[View source]
549
550
551
552
553
554
555
|
# File 'lib/couchbase/options.rb', line 549
def to_backend
{
timeout: @timeout.respond_to?(:in_milliseconds) ? @timeout.public_send(:in_milliseconds) : @timeout,
expiry: @expiry,
durability_level: @durability_level,
}
end
|