Class: Couchbase::Bucket::ViewOptions
- Inherits:
-
Object
- Object
- Couchbase::Bucket::ViewOptions
- Defined in:
- lib/couchbase/view_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/view_options.rb more...
Instance Attribute Summary collapse
-
#debug ⇒ Boolean
Allows to return debug information as part of the view response.
-
#end_key ⇒ #to_json
Specifies the key, at which the result generation has to be stopped.
-
#end_key_doc_id ⇒ String
Specifies the document id in case #end_key gives multiple results within the index.
-
#group ⇒ Boolean
Specifies whether to enable grouping of the results.
-
#group_level ⇒ Integer
Specifies the depth within the key to group the results.
-
#inclusive_end ⇒ Boolean
Specifies whether the #end_key/##end_key_doc_id values should be inclusive.
-
#key ⇒ #to_json
Specifies the set of the keys to fetch from the index.
-
#keys ⇒ Array<#to_json>
Specifies set of the keys to fetch from the index.
-
#limit ⇒ Integer
Specifies the maximum number of results to return.
- #namespace ⇒ :production, :development
-
#on_error ⇒ :stop, :continue
Specifies the behaviour of the view engine should an error occur during the gathering of view index results which would result in only partial results being available.
-
#order ⇒ :ascending, :descending
Specifies the order of the results that should be returned.
-
#reduce ⇒ Boolean
Specifies whether to enable the reduction function associated with this particular view index.
-
#scan_consistency ⇒ :not_bounded, ...
Specifies the level of consistency for the query.
-
#skip ⇒ Integer
Specifies the number of results to skip from the start of the result set.
-
#start_key ⇒ Object
Specifies the key, to which the engine has to skip before result generation.
-
#start_key_doc_id ⇒ String
Specifies the document id in case #start_key gives multiple results within the index.
-
#timeout ⇒ Integer
Timeout in milliseconds.
Instance Method Summary collapse
-
#initialize {|self| ... } ⇒ ViewOptions
constructor
A new instance of ViewOptions.
-
#raw(key, value) ⇒ Object
Allows providing custom JSON key/value pairs for advanced usage.
Constructor Details
#initialize {|self| ... } ⇒ ViewOptions
Returns a new instance of ViewOptions.
95 96 97 98 |
# File 'lib/couchbase/view_options.rb', line 95 def initialize @namespace = :production yield self if block_given? end |
Instance Attribute Details
#debug ⇒ Boolean
Returns allows to return debug information as part of the view response.
89 90 91 |
# File 'lib/couchbase/view_options.rb', line 89 def debug @debug end |
#end_key ⇒ #to_json
Specifies the key, at which the result generation has to be stopped
40 41 42 |
# File 'lib/couchbase/view_options.rb', line 40 def end_key @end_key end |
#end_key_doc_id ⇒ String
Specifies the document id in case #end_key gives multiple results within the index
48 49 50 |
# File 'lib/couchbase/view_options.rb', line 48 def end_key_doc_id @end_key_doc_id end |
#group ⇒ Boolean
Specifies whether to enable grouping of the results
57 58 59 |
# File 'lib/couchbase/view_options.rb', line 57 def group @group end |
#group_level ⇒ Integer
Specifies the depth within the key to group the results
62 63 64 |
# File 'lib/couchbase/view_options.rb', line 62 def group_level @group_level end |
#inclusive_end ⇒ Boolean
Specifies whether the #end_key/##end_key_doc_id values should be inclusive
52 53 54 |
# File 'lib/couchbase/view_options.rb', line 52 def inclusive_end @inclusive_end end |
#key ⇒ #to_json
Specifies the set of the keys to fetch from the index
66 67 68 |
# File 'lib/couchbase/view_options.rb', line 66 def key @key end |
#keys ⇒ Array<#to_json>
Specifies set of the keys to fetch from the index
71 72 73 |
# File 'lib/couchbase/view_options.rb', line 71 def keys @keys end |
#limit ⇒ Integer
Specifies the maximum number of results to return
33 34 35 |
# File 'lib/couchbase/view_options.rb', line 33 def limit @limit end |
#namespace ⇒ :production, :development
92 93 94 |
# File 'lib/couchbase/view_options.rb', line 92 def namespace @namespace end |
#on_error ⇒ :stop, :continue
Specifies the behaviour of the view engine should an error occur during the gathering of view index results which would result in only partial results being available
86 87 88 |
# File 'lib/couchbase/view_options.rb', line 86 def on_error @on_error end |
#order ⇒ :ascending, :descending
Specifies the order of the results that should be returned
76 77 78 |
# File 'lib/couchbase/view_options.rb', line 76 def order @order end |
#reduce ⇒ Boolean
Specifies whether to enable the reduction function associated with this particular view index
80 81 82 |
# File 'lib/couchbase/view_options.rb', line 80 def reduce @reduce end |
#scan_consistency ⇒ :not_bounded, ...
Specifies the level of consistency for the query
25 26 27 |
# File 'lib/couchbase/view_options.rb', line 25 def scan_consistency @scan_consistency end |
#skip ⇒ Integer
Specifies the number of results to skip from the start of the result set
29 30 31 |
# File 'lib/couchbase/view_options.rb', line 29 def skip @skip end |
#start_key ⇒ Object
Specifies the key, to which the engine has to skip before result generation
36 37 38 |
# File 'lib/couchbase/view_options.rb', line 36 def start_key @start_key end |
#start_key_doc_id ⇒ String
Specifies the document id in case #start_key gives multiple results within the index
44 45 46 |
# File 'lib/couchbase/view_options.rb', line 44 def start_key_doc_id @start_key_doc_id end |
#timeout ⇒ Integer
Returns Timeout in milliseconds.
21 22 23 |
# File 'lib/couchbase/view_options.rb', line 21 def timeout @timeout end |
Instance Method Details
#raw(key, value) ⇒ Object
Allows providing custom JSON key/value pairs for advanced usage
104 105 106 |
# File 'lib/couchbase/view_options.rb', line 104 def raw(key, value) @raw_parameters[key] = JSON.generate(value) end |