final class StatementExecution
    implements StatementInterface
Restricted visibility: declared "@visibility ZtdQuery\Adapter\Pdo". Code outside that scope must not name this declaration.

Coordinates rewritten preparation, native execution and shadow post-processing. Its StatementInterface exposes native result rows to the core result-select runner.

Methods§

public function __construct(
    private PdoStatement $statement,
    private Session $session,
    private ?RewritePlan $plan,
    private ?PreparedQuery $prepared = null,
    private Bindings $bindings = new \ZtdQuery\Adapter\Pdo\Session\Bindings(),
)

Retain the native statement and the plan that governs its execution.

Parameters

$statementPdoStatement
$sessionSession
$plan?RewritePlan
$prepared?PreparedQuery
$bindingsBindings
Calls 1
public function bindParameter(int|string $parameter, Closure(PDOStatement): bool $binding): bool

Retain a parameter binding and apply it to the current native statement.

Parameters

$parameterint|string
$bindingClosure(PDOStatement): bool

Returns

bool
Test cases 1
Called from 1
Calls 1
public function postProcess(RewritePlan $plan): bool

Apply a result-select query's rows to the session's shadow state.

Parameters

Returns

bool

Throws

ZtdPdoException When the core rejects the simulated mutation.
Test cases 1
Called from 1
Calls 2
public function native(): PdoStatement

Return the driver statement currently serving this execution.

Test cases 4
Called from 18
public function rowCount(): int

Private surface 6§

Implementation details, listed for orientation only.

private ?ExecuteResult $result = null
private PdoStatement $statement
private Session $session
private ?RewritePlan $plan
private ?PreparedQuery $prepared = null
private Bindings $bindings = new \ZtdQuery\Adapter\Pdo\Session\Bindings()

Test cases 18§

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

Dedicated tests 10
Other tests reaching this symbol 8

Relations§

Instantiated in 1
Method calls 29
Type declarations 1