Class: Couchbase::Collection::ExistsResult

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/collection_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/collection_options.rb
more...

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|| ... } ⇒ ExistsResult

Returns a new instance of ExistsResult.

Yield Parameters:

[View source]

99
100
101
102
# File 'lib/couchbase/collection_options.rb', line 99

def initialize
  @durability_level = :none
  yield self if block_given?
end

Instance Attribute Details

#casInteger

Returns holds the CAS value of the fetched document.

Returns:

  • (Integer)

    holds the CAS value of the fetched document


88
89
90
# File 'lib/couchbase/collection_options.rb', line 88

def cas
  @cas
end

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)
[View source]

94
95
96
# File 'lib/couchbase/collection_options.rb', line 94

def exists?
  status == :found || status == :persisted
end