Class: Couchbase::Collection::MutateInResult
- Inherits:
-
MutationResult
- Object
- MutationResult
- Couchbase::Collection::MutateInResult
- Defined in:
- lib/couchbase/collection_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/collection_options.rb more...
Instance Attribute Summary collapse
-
#deleted ⇒ Object
Returns the value of attribute deleted.
-
#transcoder ⇒ JsonTranscoder
The default transcoder which should be used.
Attributes inherited from MutationResult
Instance Method Summary collapse
-
#content(index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index.
-
#deleted? ⇒ Boolean
True if the document is a tombstone (created in deleted state).
-
#initialize {|self| ... } ⇒ MutateInResult
constructor
A new instance of MutateInResult.
Constructor Details
#initialize {|self| ... } ⇒ MutateInResult
Returns a new instance of MutateInResult.
202 203 204 205 |
# File 'lib/couchbase/collection_options.rb', line 202 def initialize super yield self if block_given? end |
Instance Attribute Details
#deleted ⇒ Object
Returns the value of attribute deleted.
199 200 201 |
# File 'lib/couchbase/collection_options.rb', line 199 def deleted @deleted end |
#transcoder ⇒ JsonTranscoder
Returns The default transcoder which should be used.
226 227 228 |
# File 'lib/couchbase/collection_options.rb', line 226 def transcoder @transcoder end |
Instance Method Details
#content(index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index
183 184 185 186 187 188 189 190 |
# File 'lib/couchbase/collection_options.rb', line 183 def content(index, transcoder = self.transcoder) field = get_field_at_index(index) if field.type == :counter field.value else transcoder.decode(field.value, :json) end end |
#deleted? ⇒ Boolean
Returns true if the document is a tombstone (created in deleted state).
195 196 197 |
# File 'lib/couchbase/collection_options.rb', line 195 def deleted? @deleted end |