Class: Couchbase::Options::View
- Defined in:
- lib/couchbase/options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/options.rb more...
Overview
Options for Cluster#view_query
Instance Attribute Summary collapse
- #debug ⇒ Boolean?
- #end_key ⇒ #to_json?
- #end_key_doc_id ⇒ String?
- #group ⇒ Boolean?
- #group_level ⇒ Integer?
- #inclusive_end ⇒ Boolean?
- #key ⇒ #to_json?
- #keys ⇒ Array<#to_json>?
- #limit ⇒ Integer
- #namespace ⇒ Symbol
- #on_error ⇒ Symbol?
- #order ⇒ Symbol?
- #reduce ⇒ Boolean?
- #scan_consistency ⇒ Symbol
- #skip ⇒ Integer
- #start_key ⇒ #to_json?
- #start_key_doc_id ⇒ String?
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary collapse
-
#initialize(scan_consistency: :not_bounded, namespace: :production, skip: nil, limit: nil, start_key: nil, end_key: nil, start_key_doc_id: nil, end_key_doc_id: nil, inclusive_end: nil, group: nil, group_level: nil, key: nil, keys: nil, order: nil, reduce: nil, on_error: nil, debug: false, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ View
constructor
A new instance of View.
-
#raw(key, value) ⇒ Object
Allows providing custom JSON key/value pairs for advanced usage.
Constructor Details
#initialize(scan_consistency: :not_bounded, namespace: :production, skip: nil, limit: nil, start_key: nil, end_key: nil, start_key_doc_id: nil, end_key_doc_id: nil, inclusive_end: nil, group: nil, group_level: nil, key: nil, keys: nil, order: nil, reduce: nil, on_error: nil, debug: false, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ View
Returns a new instance of View.
2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 |
# File 'lib/couchbase/options.rb', line 2246 def initialize(scan_consistency: :not_bounded, namespace: :production, skip: nil, limit: nil, start_key: nil, end_key: nil, start_key_doc_id: nil, end_key_doc_id: nil, inclusive_end: nil, group: nil, group_level: nil, key: nil, keys: nil, order: nil, reduce: nil, on_error: nil, debug: false, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) super(timeout: timeout, retry_strategy: retry_strategy, client_context: client_context, parent_span: parent_span) @scan_consistency = scan_consistency @namespace = namespace @skip = skip @limit = limit @start_key = start_key @end_key = end_key @start_key_doc_id = start_key_doc_id @end_key_doc_id = end_key_doc_id @inclusive_end = inclusive_end @group = group @group_level = group_level @key = key @keys = keys @order = order @reduce = reduce @on_error = on_error @debug = debug yield self if block_given? end |
Instance Attribute Details
#debug ⇒ Boolean?
2218 2219 2220 |
# File 'lib/couchbase/options.rb', line 2218 def debug @debug end |
#end_key ⇒ #to_json?
2207 2208 2209 |
# File 'lib/couchbase/options.rb', line 2207 def end_key @end_key end |
#end_key_doc_id ⇒ String?
2209 2210 2211 |
# File 'lib/couchbase/options.rb', line 2209 def end_key_doc_id @end_key_doc_id end |
#group ⇒ Boolean?
2211 2212 2213 |
# File 'lib/couchbase/options.rb', line 2211 def group @group end |
#group_level ⇒ Integer?
2212 2213 2214 |
# File 'lib/couchbase/options.rb', line 2212 def group_level @group_level end |
#inclusive_end ⇒ Boolean?
2210 2211 2212 |
# File 'lib/couchbase/options.rb', line 2210 def inclusive_end @inclusive_end end |
#key ⇒ #to_json?
2213 2214 2215 |
# File 'lib/couchbase/options.rb', line 2213 def key @key end |
#keys ⇒ Array<#to_json>?
2214 2215 2216 |
# File 'lib/couchbase/options.rb', line 2214 def keys @keys end |
#limit ⇒ Integer
2205 2206 2207 |
# File 'lib/couchbase/options.rb', line 2205 def limit @limit end |
#namespace ⇒ Symbol
2203 2204 2205 |
# File 'lib/couchbase/options.rb', line 2203 def namespace @namespace end |
#on_error ⇒ Symbol?
2217 2218 2219 |
# File 'lib/couchbase/options.rb', line 2217 def on_error @on_error end |
#order ⇒ Symbol?
2215 2216 2217 |
# File 'lib/couchbase/options.rb', line 2215 def order @order end |
#reduce ⇒ Boolean?
2216 2217 2218 |
# File 'lib/couchbase/options.rb', line 2216 def reduce @reduce end |
#scan_consistency ⇒ Symbol
2202 2203 2204 |
# File 'lib/couchbase/options.rb', line 2202 def scan_consistency @scan_consistency end |
#skip ⇒ Integer
2204 2205 2206 |
# File 'lib/couchbase/options.rb', line 2204 def skip @skip end |
#start_key ⇒ #to_json?
2206 2207 2208 |
# File 'lib/couchbase/options.rb', line 2206 def start_key @start_key end |
#start_key_doc_id ⇒ String?
2208 2209 2210 |
# File 'lib/couchbase/options.rb', line 2208 def start_key_doc_id @start_key_doc_id end |
Instance Method Details
#raw(key, value) ⇒ Object
Allows providing custom JSON key/value pairs for advanced usage
2293 2294 2295 |
# File 'lib/couchbase/options.rb', line 2293 def raw(key, value) @raw_parameters[key] = JSON.generate(value) end |