final class StatementSimulator

Executes rewritten statements and applies shadow mutations for exec().

Exception handling for unsupported SQL and unknown schema is now done in Session::rewrite(), so this class simply delegates to the session.

Methods§

public function simulate(
    string $statement,
    callable(string): StatementInterface|false $executor,
): int|false

Simulate exec() by running result-select and updating shadow state.

Session::rewrite() now handles exceptions for unsupported SQL and unknown schema based on config, so we no longer need to handle FORBIDDEN/UNKNOWN_SCHEMA here.

Parameters

$statementstring
$executorcallable(string): StatementInterface|false

Returns

int|false
Test cases 5
Calls 5

Private surface 1§

Implementation details, listed for orientation only.

private Session $session

Test cases 5§

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

Dedicated tests 5