Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/couchbase/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,8 @@ def mutate_in(id, specs, options = Options::MutateIn::DEFAULT)
# @param [RangeScan, PrefixScan, SamplingScan] scan_type the type of the scan
# @param [Options::Scan] options request customization
#
# @return [ScanResults]
#
# @example Get a sample of up to 5 documents from the collection and store their IDs in an array
# result = collection.scan(SamplingScan.new(5), Options::Scan.new(ids_only: true))
# ids = result.map { |item| item.id }
Expand All @@ -613,7 +615,10 @@ def mutate_in(id, specs, options = Options::MutateIn::DEFAULT)
# ))
# result.each { |item| puts item.content }
#
# @return [ScanResults]
# @note
# Use this API for low concurrency batch queries where latency is not a critical as the system may have to scan
# a lot of documents to find the matching documents. For low latency range queries, it is recommended that you use
# SQL++ with the necessary indexes.
def scan(scan_type, options = Options::Scan::DEFAULT)
ScanResults.new(
core_scan_result: @backend.document_scan_create(
Expand Down