A sampling scan performs a scan that randomly selects documents up to a configured limit.
More...
#include <couchbase/scan_type.hxx>
|
| 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.
|
|
virtual | ~scan_type ()=default |
|
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
◆ sampling_scan() [1/2]
Creates an instance of a sampling scan type.
- Parameters
-
limit | the 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]
Creates an instance of a sampling scan type with a seed.
- Parameters
-
limit | the maximum number of documents the sampling scan can return. |
seed | the 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
◆ 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()
Sets the seed for the sampling scan.
- Parameters
-
seed | the 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: