classPackedRows
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
$blob | string | Every row, packed as the codec writes them |
$offsets | list<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
$state | int | State number |
Returns
array<int, int> Action code by symbol numberTest cases 2
Calls 4
- function-call
intdivline 50 - static-call TableCodec::integers() line 51
- function-call
substrline 51 - function-call
array_combineline 54
public function count(): intAnswers how many states there are.
Returns
int State countTest cases 1
Private surface 3§
Implementation details, listed for orientation only.
private array<int, array<int, int>> $decoded = []private string $blobprivate list<int> $offsetsTest 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
MySqlParserTestcallsPostgreSqlParserTestcallsResourceWriterTestcallsSqliteParserTestcallsTableCodecTestcallsTableFileTestcalls