InMemoryRows implements Sniffer
Read onlyYes
FinalYes
Interfaces
Methods
- __construct() : mixed
- bytes() : int<0, max>
- close() : void
- Releases what the sniffs left open.
- names() : array<int, string>
- parts() : array<int, self>
- Live one-unit sniffers that together cover $unit (unit 0 of each; the parent-resolved header and candidate set): a source that can be cut hands out one per byte window of about $targetBytes, every other one hands out [itself over $unit]. A part runs in a worker when it is Describable with a non-null describe(); the parts' samples merged in order are the unit's sample.
- sniff() : Sample
- units() : int<0, max>
- values() : Generator<int, array<string|int, mixed>>
- The same ColumnName normalisation array_to_rows() applies, so the fold's names are the batch builder's names.
Methods
__construct()
public
__construct(iterable<string|int, array<string|int, mixed>> $rows[, TypeNarrower $typer = new InstanceOfTypeNarrower() ]) : mixed
Parameters
- $rows : iterable<string|int, array<string|int, mixed>>
- $typer : TypeNarrower = new InstanceOfTypeNarrower()
bytes()
public
bytes(int $unit) : int<0, max>
Parameters
- $unit : int
Return values
int<0, max> —on-disk bytes of the unit; 0 when unknown or in memory
close()
Releases what the sniffs left open.
public
close() : void
names()
public
names() : array<int, string>
Return values
array<int, string> —columns known before any row - a header; [] for a headerless source
parts()
Live one-unit sniffers that together cover $unit (unit 0 of each; the parent-resolved header and candidate set): a source that can be cut hands out one per byte window of about $targetBytes, every other one hands out [itself over $unit]. A part runs in a worker when it is Describable with a non-null describe(); the parts' samples merged in order are the unit's sample.
public
parts(int $unit, int $targetBytes) : array<int, self>
Parameters
- $unit : int
- $targetBytes : int
Return values
array<int, self>sniff()
public
sniff(int $unit, int|null $rowBudget) : Sample
Parameters
- $unit : int
- $rowBudget : int|null
-
rows to observe from this unit, 0 for none, null for every row
Return values
Sampleunits()
public
units() : int<0, max>
Return values
int<0, max>values()
The same ColumnName normalisation array_to_rows() applies, so the fold's names are the batch builder's names.
public
values() : Generator<int, array<string|int, mixed>>