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

startQuery(string $sql, array $params = [], array $types = [])

Logs a SQL statement somewhere.

stopQuery()

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

Details

startQuery(string $sql, array $params = [], array $types = [])

Logs a SQL statement somewhere.

Parameters

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

stopQuery()

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