Class: Couchbase::Options::View
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.
2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 |
# File 'lib/couchbase/options.rb', line 2421 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?
2393 2394 2395 |
# File 'lib/couchbase/options.rb', line 2393 def debug @debug end |
#end_key ⇒ #to_json?
2382 2383 2384 |
# File 'lib/couchbase/options.rb', line 2382 def end_key @end_key end |
#end_key_doc_id ⇒ String?
2384 2385 2386 |
# File 'lib/couchbase/options.rb', line 2384 def end_key_doc_id @end_key_doc_id end |
#group ⇒ Boolean?
2386 2387 2388 |
# File 'lib/couchbase/options.rb', line 2386 def group @group end |
#group_level ⇒ Integer?
2387 2388 2389 |
# File 'lib/couchbase/options.rb', line 2387 def group_level @group_level end |
#inclusive_end ⇒ Boolean?
2385 2386 2387 |
# File 'lib/couchbase/options.rb', line 2385 def inclusive_end @inclusive_end end |
#key ⇒ #to_json?
2388 2389 2390 |
# File 'lib/couchbase/options.rb', line 2388 def key @key end |
#keys ⇒ Array<#to_json>?
2389 2390 2391 |
# File 'lib/couchbase/options.rb', line 2389 def keys @keys end |
#limit ⇒ Integer
2380 2381 2382 |
# File 'lib/couchbase/options.rb', line 2380 def limit @limit end |
#namespace ⇒ Symbol
2378 2379 2380 |
# File 'lib/couchbase/options.rb', line 2378 def namespace @namespace end |
#on_error ⇒ Symbol?
2392 2393 2394 |
# File 'lib/couchbase/options.rb', line 2392 def on_error @on_error end |
#order ⇒ Symbol?
2390 2391 2392 |
# File 'lib/couchbase/options.rb', line 2390 def order @order end |
#reduce ⇒ Boolean?
2391 2392 2393 |
# File 'lib/couchbase/options.rb', line 2391 def reduce @reduce end |
#scan_consistency ⇒ Symbol
2377 2378 2379 |
# File 'lib/couchbase/options.rb', line 2377 def scan_consistency @scan_consistency end |
#skip ⇒ Integer
2379 2380 2381 |
# File 'lib/couchbase/options.rb', line 2379 def skip @skip end |
#start_key ⇒ #to_json?
2381 2382 2383 |
# File 'lib/couchbase/options.rb', line 2381 def start_key @start_key end |
#start_key_doc_id ⇒ String?
2383 2384 2385 |
# File 'lib/couchbase/options.rb', line 2383 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
2468 2469 2470 |
# File 'lib/couchbase/options.rb', line 2468 def raw(key, value) @raw_parameters[key] = JSON.generate(value) end |