class DebugStack implements SQLLogger (View source)

Includes executed SQLs in a Debug Stack.

Properties

mixed[][] $queries Executed SQL queries.
bool $enabled If Debug Stack is enabled (log queries) or not.
float|null $start
int $currentQuery

Methods

void
startQuery(string $sql, array|null $params = null, array|null $types = null)

Logs a SQL statement somewhere.

void
stopQuery()

Marks the last started query as stopped. This can be used for timing of queries.

Details

void startQuery(string $sql, array|null $params = null, array|null $types = null)

Logs a SQL statement somewhere.

Parameters

string $sql The SQL to be executed.
array|null $params The SQL parameters.
array|null $types The SQL parameter types.

Return Value

void

void stopQuery()

Marks the last started query as stopped. This can be used for timing of queries.

Return Value

void