Class: Couchbase::Options::MutateIn
- Defined in:
- lib/couchbase/options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/options.rb more...
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
926 927 928 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 |
# File 'lib/couchbase/options.rb', line 926 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 = Utils::Time.extract_expiry_time(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?
876 877 878 |
# File 'lib/couchbase/options.rb', line 876 def cas @cas end |
#durability_level ⇒ Symbol
877 878 879 |
# File 'lib/couchbase/options.rb', line 877 def durability_level @durability_level end |
#expiry ⇒ Integer, ...
874 875 876 |
# File 'lib/couchbase/options.rb', line 874 def expiry @expiry end |
#preserve_expiry ⇒ Boolean
879 880 881 |
# File 'lib/couchbase/options.rb', line 879 def preserve_expiry @preserve_expiry end |
#store_semantics ⇒ Symbol
875 876 877 |
# File 'lib/couchbase/options.rb', line 875 def store_semantics @store_semantics end |
#transcoder ⇒ JsonTranscoder, #encode(Object)
878 879 880 |
# File 'lib/couchbase/options.rb', line 878 def transcoder @transcoder end |