Class: Couchbase::Options::View
- Defined in:
- lib/couchbase/options.rb,
/home/runner/work/couchbase-ruby-client/couchbase-ruby-client/lib/couchbase/options.rb
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 query-string parameters 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.
2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 |
# File 'lib/couchbase/options.rb', line 2643 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, &nil) @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 @raw_parameters = {} yield self if block_given? end |
Instance Attribute Details
#debug ⇒ Boolean?
2615 2616 2617 |
# File 'lib/couchbase/options.rb', line 2615 def debug @debug end |
#end_key ⇒ #to_json?
2604 2605 2606 |
# File 'lib/couchbase/options.rb', line 2604 def end_key @end_key end |
#end_key_doc_id ⇒ String?
2606 2607 2608 |
# File 'lib/couchbase/options.rb', line 2606 def end_key_doc_id @end_key_doc_id end |
#group ⇒ Boolean?
2608 2609 2610 |
# File 'lib/couchbase/options.rb', line 2608 def group @group end |
#group_level ⇒ Integer?
2609 2610 2611 |
# File 'lib/couchbase/options.rb', line 2609 def group_level @group_level end |
#inclusive_end ⇒ Boolean?
2607 2608 2609 |
# File 'lib/couchbase/options.rb', line 2607 def inclusive_end @inclusive_end end |
#key ⇒ #to_json?
2610 2611 2612 |
# File 'lib/couchbase/options.rb', line 2610 def key @key end |
#keys ⇒ Array<#to_json>?
2611 2612 2613 |
# File 'lib/couchbase/options.rb', line 2611 def keys @keys end |
#limit ⇒ Integer
2602 2603 2604 |
# File 'lib/couchbase/options.rb', line 2602 def limit @limit end |
#namespace ⇒ Symbol
2600 2601 2602 |
# File 'lib/couchbase/options.rb', line 2600 def namespace @namespace end |
#on_error ⇒ Symbol?
2614 2615 2616 |
# File 'lib/couchbase/options.rb', line 2614 def on_error @on_error end |
#order ⇒ Symbol?
2612 2613 2614 |
# File 'lib/couchbase/options.rb', line 2612 def order @order end |
#reduce ⇒ Boolean?
2613 2614 2615 |
# File 'lib/couchbase/options.rb', line 2613 def reduce @reduce end |
#scan_consistency ⇒ Symbol
2599 2600 2601 |
# File 'lib/couchbase/options.rb', line 2599 def scan_consistency @scan_consistency end |
#skip ⇒ Integer
2601 2602 2603 |
# File 'lib/couchbase/options.rb', line 2601 def skip @skip end |
#start_key ⇒ #to_json?
2603 2604 2605 |
# File 'lib/couchbase/options.rb', line 2603 def start_key @start_key end |
#start_key_doc_id ⇒ String?
2605 2606 2607 |
# File 'lib/couchbase/options.rb', line 2605 def start_key_doc_id @start_key_doc_id end |
Instance Method Details
#raw(key, value) ⇒ Object
Allows providing custom query-string parameters for advanced usage
The SDK form-encodes the name and the value. A parameter that shares its name with a typed option is sent in addition to it.
2699 2700 2701 |
# File 'lib/couchbase/options.rb', line 2699 def raw(key, value) @raw_parameters[key.to_s] = value.is_a?(String) ? value : JSON.generate(value) end |