Class: Couchbase::Cluster::AnalyticsOptions
- Inherits:
-
Object
- Object
- Couchbase::Cluster::AnalyticsOptions
- Defined in:
- lib/couchbase/analytics_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/analytics_options.rb more...
Instance Attribute Summary collapse
-
#client_context_id ⇒ String
Provides a custom client context ID for this query.
-
#priority ⇒ Boolean
Allows to give certain requests higher priority than others.
-
#readonly ⇒ Boolean
Allows explicitly marking a query as being readonly and not mutating any documents on the server side.
-
#scan_consistency ⇒ :not_bounded, :request_plus
Specifies level of consistency for the query.
-
#timeout ⇒ Integer
Timeout in milliseconds.
-
#transcoder ⇒ JsonTranscoder
Transcoder to use on rows.
Instance Method Summary collapse
-
#initialize {|self| ... } ⇒ AnalyticsOptions
constructor
A new instance of AnalyticsOptions.
-
#named_parameters(named) ⇒ Object
Sets named parameters for the query.
-
#positional_parameters(positional) ⇒ Object
Sets positional parameters for the query.
-
#raw(key, value) ⇒ Object
Allows providing custom JSON key/value pairs for advanced usage.
Constructor Details
#initialize {|self| ... } ⇒ AnalyticsOptions
Returns a new instance of AnalyticsOptions.
43 44 45 46 47 48 49 50 |
# File 'lib/couchbase/analytics_options.rb', line 43 def initialize @transcoder = JsonTranscoder.new @raw_parameters = {} @positional_parameters = nil @named_parameters = nil @scan_consistency = nil yield self if block_given? end |
Instance Attribute Details
#client_context_id ⇒ String
Returns Provides a custom client context ID for this query.
24 25 26 |
# File 'lib/couchbase/analytics_options.rb', line 24 def client_context_id @client_context_id end |
#priority ⇒ Boolean
Returns Allows to give certain requests higher priority than others.
33 34 35 |
# File 'lib/couchbase/analytics_options.rb', line 33 def priority @priority end |
#readonly ⇒ Boolean
Returns Allows explicitly marking a query as being readonly and not mutating any documents on the server side.
30 31 32 |
# File 'lib/couchbase/analytics_options.rb', line 30 def readonly @readonly end |
#scan_consistency ⇒ :not_bounded, :request_plus
Returns specifies level of consistency for the query.
27 28 29 |
# File 'lib/couchbase/analytics_options.rb', line 27 def scan_consistency @scan_consistency end |
#timeout ⇒ Integer
Returns Timeout in milliseconds.
21 22 23 |
# File 'lib/couchbase/analytics_options.rb', line 21 def timeout @timeout end |
#transcoder ⇒ JsonTranscoder
Returns transcoder to use on rows.
36 37 38 |
# File 'lib/couchbase/analytics_options.rb', line 36 def transcoder @transcoder end |
Instance Method Details
#named_parameters(named) ⇒ Object
Sets named parameters for the query
69 70 71 72 |
# File 'lib/couchbase/analytics_options.rb', line 69 def named_parameters(named) @named_parameters = named @positional_parameters = nil end |
#positional_parameters(positional) ⇒ Object
Sets positional parameters for the query
55 56 57 58 |
# File 'lib/couchbase/analytics_options.rb', line 55 def positional_parameters(positional) @positional_parameters = positional @named_parameters = nil end |
#raw(key, value) ⇒ Object
Allows providing custom JSON key/value pairs for advanced usage
78 79 80 |
# File 'lib/couchbase/analytics_options.rb', line 78 def raw(key, value) @raw_parameters[key] = JSON.generate(value) end |