Class: Couchbase::Collection::ExistsResult
- Inherits:
-
Object
- Object
- Couchbase::Collection::ExistsResult
- Defined in:
- lib/couchbase/collection_options.rb
Instance Attribute Summary collapse
-
#cas ⇒ Integer
Holds the CAS value of the fetched document.
-
#datatype ⇒ Integer
private
Datatype.
-
#deleted ⇒ Boolean
True if the document was deleted.
-
#exists ⇒ Boolean
(also: #exists?)
True if the document exists.
-
#expiry ⇒ Integer
writeonly
The expiration if fetched and present.
-
#flags ⇒ Integer
private
Flags.
-
#sequence_number ⇒ Integer
private
Sequence_number.
Instance Method Summary collapse
-
#expiry_time ⇒ Time
Time when the document will expire.
-
#initialize {|| ... } ⇒ ExistsResult
constructor
A new instance of ExistsResult.
Constructor Details
#initialize {|| ... } ⇒ ExistsResult
Returns a new instance of ExistsResult.
106 107 108 |
# File 'lib/couchbase/collection_options.rb', line 106 def initialize yield self if block_given? end |
Instance Attribute Details
#cas ⇒ Integer
Returns holds the CAS value of the fetched document.
96 97 98 |
# File 'lib/couchbase/collection_options.rb', line 96 def cas @cas end |
#datatype ⇒ Integer
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 datatype.
128 129 130 |
# File 'lib/couchbase/collection_options.rb', line 128 def datatype @datatype end |
#deleted ⇒ Boolean
Returns true if the document was deleted.
99 100 101 |
# File 'lib/couchbase/collection_options.rb', line 99 def deleted @deleted end |
#exists ⇒ Boolean Also known as: exists?
Returns true if the document exists.
102 103 104 |
# File 'lib/couchbase/collection_options.rb', line 102 def exists @exists end |
#expiry=(value) ⇒ Integer (writeonly)
Returns the expiration if fetched and present.
111 112 113 |
# File 'lib/couchbase/collection_options.rb', line 111 def expiry=(value) @expiry = value end |
#flags ⇒ Integer
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 flags.
120 121 122 |
# File 'lib/couchbase/collection_options.rb', line 120 def flags @flags end |
#sequence_number ⇒ Integer
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 sequence_number.
124 125 126 |
# File 'lib/couchbase/collection_options.rb', line 124 def sequence_number @sequence_number end |
Instance Method Details
#expiry_time ⇒ Time
Returns time when the document will expire.
114 115 116 |
# File 'lib/couchbase/collection_options.rb', line 114 def expiry_time Time.at(@expiry) if @expiry end |