Class: Couchbase::Options::MutateIn
- Defined in:
- lib/couchbase/options.rb
Overview
Options for Collection#mutate_in
Instance Attribute Summary collapse
- #cas ⇒ Integer?
- #durability_level ⇒ Symbol
- #expiry ⇒ Integer, ...
- #preserve_expiry ⇒ Boolean
- #store_semantics ⇒ Symbol
- #transcoder ⇒ JsonTranscoder, #encode(Object)
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary collapse
-
#initialize(expiry: nil, preserve_expiry: false, store_semantics: :replace, cas: nil, access_deleted: false, create_as_deleted: false, durability_level: :none, replicate_to: :none, persist_to: :none, transcoder: JsonTranscoder.new, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|| ... } ⇒ MutateIn
constructor
Creates an instance of options for Collection#mutate_in.
Constructor Details
#initialize(expiry: nil, preserve_expiry: false, store_semantics: :replace, cas: nil, access_deleted: false, create_as_deleted: false, durability_level: :none, replicate_to: :none, persist_to: :none, transcoder: JsonTranscoder.new, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|| ... } ⇒ MutateIn
Creates an instance of options for Collection#mutate_in
929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 |
# File 'lib/couchbase/options.rb', line 929 def initialize(expiry: nil, preserve_expiry: false, store_semantics: :replace, cas: nil, access_deleted: false, create_as_deleted: false, durability_level: :none, replicate_to: :none, persist_to: :none, transcoder: JsonTranscoder.new, 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 = expiry @preserve_expiry = preserve_expiry @store_semantics = store_semantics @cas = cas @access_deleted = access_deleted @create_as_deleted = create_as_deleted 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 @transcoder = transcoder yield self if block_given? end |
Instance Attribute Details
#cas ⇒ Integer?
879 880 881 |
# File 'lib/couchbase/options.rb', line 879 def cas @cas end |
#durability_level ⇒ Symbol
880 881 882 |
# File 'lib/couchbase/options.rb', line 880 def durability_level @durability_level end |
#expiry ⇒ Integer, ...
877 878 879 |
# File 'lib/couchbase/options.rb', line 877 def expiry @expiry end |
#preserve_expiry ⇒ Boolean
882 883 884 |
# File 'lib/couchbase/options.rb', line 882 def preserve_expiry @preserve_expiry end |
#store_semantics ⇒ Symbol
878 879 880 |
# File 'lib/couchbase/options.rb', line 878 def store_semantics @store_semantics end |
#transcoder ⇒ JsonTranscoder, #encode(Object)
881 882 883 |
# File 'lib/couchbase/options.rb', line 881 def transcoder @transcoder end |