Class: Couchbase::Options::Remove
Overview
Options for Collection#remove
Constant Summary collapse
- DEFAULT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Remove.new.freeze
Instance Attribute Summary collapse
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary collapse
-
#initialize(cas: nil, durability_level: :none, replicate_to: :none, persist_to: :none, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|| ... } ⇒ Remove
constructor
Creates an instance of options for Collection#remove.
- #to_backend ⇒ Object private
Constructor Details
#initialize(cas: nil, durability_level: :none, replicate_to: :none, persist_to: :none, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|| ... } ⇒ Remove
Creates an instance of options for Collection#remove
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/couchbase/options.rb', line 434 def initialize(cas: nil, durability_level: :none, replicate_to: :none, persist_to: :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) @cas = cas if durability_level != :none && (replicate_to != :none || persist_to != :none) raise ArgumentError, "durability_level conflicts with replicate_to and persist_to options" end @persist_to = persist_to @replicate_to = replicate_to @durability_level = durability_level yield self if block_given? end |
Instance Attribute Details
#cas ⇒ Integer?
396 397 398 |
# File 'lib/couchbase/options.rb', line 396 def cas @cas end |
#durability_level ⇒ Symbol
397 398 399 |
# File 'lib/couchbase/options.rb', line 397 def durability_level @durability_level end |
Instance Method Details
#to_backend ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
455 456 457 458 459 460 461 462 463 |
# File 'lib/couchbase/options.rb', line 455 def to_backend { timeout: Utils::Time.extract_duration(@timeout), durability_level: @durability_level, persist_to: @persist_to, replicate_to: @replicate_to, cas: @cas, } end |