final class PackedRows
    implements ActionRows
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Action rows kept packed in binary and decoded one state at a time.

A full SQL grammar has hundreds of thousands of actions, while a parse visits a few hundred states, so rows are unpacked on first use and remembered.

Methods§

public function __construct(private string $blob, private list<int> $offsets)

Parameters

$blobstringEvery row, packed as the codec writes them
$offsetslist<int>Byte offset of each state's row, with one more for the end
public function row(int $state): array<int, int>

Answers the explicit actions of one state.

Parameters

$stateintState number

Returns

array<int, int> Action code by symbol number
Test cases 2
Calls 4
public function count(): int

Answers how many states there are.

Returns

int State count
Test cases 1
Calls 2

Private surface 3§

Implementation details, listed for orientation only.

private array<int, array<int, int>> $decoded = []
private string $blob
private list<int> $offsets

Test cases 9§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3
Other tests reaching this symbol 6

Relations§

Instantiated in 1