GoogleSheetSampler implements SchemaSampler
FinalYes
Interfaces
- SchemaSampler
Methods
- __construct() : mixed
- batches() : null|Generator<int, array<int, RawRowValues>>
- The rows the sample already holds, batched, when its range covered the whole grid - so a read does not fetch the same rows a second time. Null when it did not, and the caller must read the sheet itself.
- header() : array<int, string>
- sample() : GoogleSheetSample
- samples() : Generator<int, Generator<int, RawRowValues>>
- $rowBudget is deliberately unused: the budget sized the single range when this sampler was constructed, and sample() is memoised, so advancing further cannot fetch more.
Methods
__construct()
public
__construct(GoogleSheetReader $reader, int<1, max>|-1 $rowBudget) : mixed
Parameters
- $reader : GoogleSheetReader
- $rowBudget : int<1, max>|-1
batches()
The rows the sample already holds, batched, when its range covered the whole grid - so a read does not fetch the same rows a second time. Null when it did not, and the caller must read the sheet itself.
public
batches(int<1, max> $batchSize) : null|Generator<int, array<int, RawRowValues>>
Parameters
- $batchSize : int<1, max>
Return values
null|Generator<int, array<int, RawRowValues>>header()
public
header() : array<int, string>
Return values
array<int, string>sample()
public
sample() : GoogleSheetSample
Return values
GoogleSheetSamplesamples()
$rowBudget is deliberately unused: the budget sized the single range when this sampler was constructed, and sample() is memoised, so advancing further cannot fetch more.
public
samples(int $rowBudget) : Generator<int, Generator<int, RawRowValues>>
Parameters
- $rowBudget : int