Couchbase C++ SDK 1.0.2 (rev. 51f4775)
Loading...
Searching...
No Matches
sampling_scan Struct Reference

A sampling scan performs a scan that randomly selects documents up to a configured limit. More...

#include <couchbase/scan_type.hxx>

Inheritance diagram for sampling_scan:
Inheritance graph

Public Member Functions

 sampling_scan (std::size_t limit)
 Creates an instance of a sampling scan type.
 
 sampling_scan (std::size_t limit, std::uint64_t seed)
 Creates an instance of a sampling scan type with a seed.
 
auto seed (std::uint64_t seed) -> sampling_scan &
 Sets the seed for the sampling scan.
 
auto build () const -> built override
 Returns the sampling scan type as an immutable value.
 
- Public Member Functions inherited from scan_type
virtual ~scan_type ()=default
 

Detailed Description

A sampling scan performs a scan that randomly selects documents up to a configured limit.

Since
1.0.0
Committed
Generally available API and should be preferred in production

Constructor & Destructor Documentation

◆ sampling_scan() [1/2]

sampling_scan ( std::size_t limit)
inlineexplicit

Creates an instance of a sampling scan type.

Parameters
limitthe maximum number of documents the sampling scan can return.
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ sampling_scan() [2/2]

sampling_scan ( std::size_t limit,
std::uint64_t seed )
inline

Creates an instance of a sampling scan type with a seed.

Parameters
limitthe maximum number of documents the sampling scan can return.
seedthe seed used for the random number generator that selects the documents.
Since
1.0.0
Committed
Generally available API and should be preferred in production

Member Function Documentation

◆ build()

auto build ( ) const -> built
inlinenodiscardoverridevirtual

Returns the sampling scan type as an immutable value.

Returns
scan type as an immutable value.
Since
1.0.0
Internal
Internal interface

Implements scan_type.

◆ seed()

auto seed ( std::uint64_t seed) -> sampling_scan&
inline

Sets the seed for the sampling scan.

Parameters
seedthe seed used for the random number generator that selects the documents.
Returns
the sampling scan object for chaining purposes.
Since
1.0.0
Committed
Generally available API and should be preferred in production

The documentation for this struct was generated from the following file: