Class: Couchbase::Options::Scan
- Defined in:
- lib/couchbase/options.rb,
/home/runner/work/couchbase-ruby-client/couchbase-ruby-client/lib/couchbase/options.rb
Overview
Options for Collection#scan
Constant Summary collapse
- DEFAULT =
Scan.new.freeze
Instance Attribute Summary collapse
- #batch_byte_limit ⇒ Integer?
- #batch_item_limit ⇒ Integer?
- #concurrency ⇒ Integer?
- #ids_only ⇒ Boolean
- #mutation_state ⇒ MutationState?
- #transcoder ⇒ JsonTranscoder, #decode(String)
Attributes inherited from Base
#client_context, #parent_span, #retry_strategy, #timeout
Instance Method Summary collapse
-
#consistent_with(mutation_state) ⇒ Object
Sets the mutation tokens this query should be consistent with.
-
#initialize(ids_only: false, transcoder: JsonTranscoder.new, mutation_state: nil, batch_byte_limit: nil, batch_item_limit: nil, concurrency: nil, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ Scan
constructor
Creates an instance of options for Collection#scan.
Constructor Details
#initialize(ids_only: false, transcoder: JsonTranscoder.new, mutation_state: nil, batch_byte_limit: nil, batch_item_limit: nil, concurrency: nil, timeout: nil, retry_strategy: nil, client_context: nil, parent_span: nil) {|self| ... } ⇒ Scan
Creates an instance of options for Collection#scan
1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/couchbase/options.rb', line 1217 def initialize(ids_only: false, transcoder: JsonTranscoder.new, mutation_state: nil, batch_byte_limit: nil, batch_item_limit: nil, concurrency: nil, 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) @ids_only = ids_only @transcoder = transcoder @mutation_state = mutation_state @batch_byte_limit = batch_byte_limit @batch_item_limit = batch_item_limit @concurrency = concurrency yield self if block_given? end |
Instance Attribute Details
#batch_byte_limit ⇒ Integer?
1195 1196 1197 |
# File 'lib/couchbase/options.rb', line 1195 def batch_byte_limit @batch_byte_limit end |
#batch_item_limit ⇒ Integer?
1196 1197 1198 |
# File 'lib/couchbase/options.rb', line 1196 def batch_item_limit @batch_item_limit end |
#concurrency ⇒ Integer?
1197 1198 1199 |
# File 'lib/couchbase/options.rb', line 1197 def concurrency @concurrency end |
#ids_only ⇒ Boolean
1192 1193 1194 |
# File 'lib/couchbase/options.rb', line 1192 def ids_only @ids_only end |
#mutation_state ⇒ MutationState?
1194 1195 1196 |
# File 'lib/couchbase/options.rb', line 1194 def mutation_state @mutation_state end |
#transcoder ⇒ JsonTranscoder, #decode(String)
1193 1194 1195 |
# File 'lib/couchbase/options.rb', line 1193 def transcoder @transcoder end |
Instance Method Details
#consistent_with(mutation_state) ⇒ Object
Note:
overrides consistency level set by #scan_consistency=
Sets the mutation tokens this query should be consistent with
1242 1243 1244 |
# File 'lib/couchbase/options.rb', line 1242 def consistent_with(mutation_state) @mutation_state = mutation_state end |