Class: Couchbase::LookupInSpec
- Inherits:
-
Object
- Object
- Couchbase::LookupInSpec
- Defined in:
- lib/couchbase/subdoc.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/subdoc.rb more...
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
-
.count(path) ⇒ LookupInSpec
Counts the number of values at a given path in the document.
-
.exists(path) ⇒ LookupInSpec
Checks if a value at the given path exists in the document.
-
.get(path) ⇒ LookupInSpec
Fetches the content from a field (if present) at the given path.
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
59 60 61 |
# File 'lib/couchbase/subdoc.rb', line 59 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
58 59 60 |
# File 'lib/couchbase/subdoc.rb', line 58 def type @type end |
Class Method Details
.count(path) ⇒ LookupInSpec
Counts the number of values at a given path in the document
45 46 47 |
# File 'lib/couchbase/subdoc.rb', line 45 def self.count(path) new(:count, path) end |
.exists(path) ⇒ LookupInSpec
Checks if a value at the given path exists in the document
37 38 39 |
# File 'lib/couchbase/subdoc.rb', line 37 def self.exists(path) new(:exists, path) end |
.get(path) ⇒ LookupInSpec
Fetches the content from a field (if present) at the given path
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/couchbase/subdoc.rb', line 22 def self.get(path) case path when Symbol new(:get, (path)) when "" new(:get_doc, "") else new(:get, path) end end |
Instance Method Details
#xattr ⇒ Object
[View source]
49 50 51 52 |
# File 'lib/couchbase/subdoc.rb', line 49 def xattr @xattr = true self end |
#xattr? ⇒ Boolean
54 55 56 |
# File 'lib/couchbase/subdoc.rb', line 54 def xattr? @xattr end |