Class: Couchbase::Collection::MutateInResult
- Inherits:
-
MutationResult
- Object
- MutationResult
- Couchbase::Collection::MutateInResult
- Defined in:
- lib/couchbase/collection_options.rb
Instance Attribute Summary collapse
- #deleted ⇒ Object private
-
#encoded ⇒ Array<SubDocumentField>
private
Holds the encoded subdocument responses.
-
#transcoder ⇒ JsonTranscoder
The default transcoder which should be used.
Attributes inherited from MutationResult
#cas, #error, #id, #mutation_token
Instance Method Summary collapse
-
#content(path_or_index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index.
-
#deleted? ⇒ Boolean
private
True if the document is a tombstone (created in deleted state).
-
#initialize {|self| ... } ⇒ MutateInResult
constructor
A new instance of MutateInResult.
Methods inherited from MutationResult
Constructor Details
#initialize {|self| ... } ⇒ MutateInResult
Returns a new instance of MutateInResult.
260 261 262 263 |
# File 'lib/couchbase/collection_options.rb', line 260 def initialize super yield self if block_given? end |
Instance Attribute Details
#deleted ⇒ 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.
282 283 284 |
# File 'lib/couchbase/collection_options.rb', line 282 def deleted @deleted end |
#encoded ⇒ Array<SubDocumentField>
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.
Returns holds the encoded subdocument responses.
267 268 269 |
# File 'lib/couchbase/collection_options.rb', line 267 def encoded @encoded end |
#transcoder ⇒ JsonTranscoder
Returns The default transcoder which should be used.
270 271 272 |
# File 'lib/couchbase/collection_options.rb', line 270 def transcoder @transcoder end |
Instance Method Details
#content(path_or_index, transcoder = self.transcoder) ⇒ Object
Decodes the content at the given index
254 255 256 257 |
# File 'lib/couchbase/collection_options.rb', line 254 def content(path_or_index, transcoder = self.transcoder) field = get_field_at_index(path_or_index) transcoder.decode(field.value, :json) end |
#deleted? ⇒ Boolean
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.
Returns true if the document is a tombstone (created in deleted state).
277 278 279 |
# File 'lib/couchbase/collection_options.rb', line 277 def deleted? @deleted end |