IQueryLogger
extends
SQLLogger
in
Interface IQueryLogger
Tags
Table of Contents
Methods
- activate() : mixed
- Activate the module for the duration of the request. Deactivated module does not create and store \OCP\Diagnostics\IQuery objects.
- getQueries() : array<string|int, IQuery>
- This method should return all \OCP\Diagnostics\IQuery objects stored using startQuery()/stopQuery() methods.
- startQuery() : mixed
- Mark the start of a query providing query SQL statement, its parameters and types.
- stopQuery() : mixed
- Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to be returned with getQueries() method.
Methods
activate()
Activate the module for the duration of the request. Deactivated module does not create and store \OCP\Diagnostics\IQuery objects.
public
activate() : mixed
Only activated module should create and store objects to be returned with getQueries() call.
Tags
getQueries()
This method should return all \OCP\Diagnostics\IQuery objects stored using startQuery()/stopQuery() methods.
public
getQueries() : array<string|int, IQuery>
Tags
Return values
array<string|int, IQuery>startQuery()
Mark the start of a query providing query SQL statement, its parameters and types.
public
startQuery(string $sql[, array<string|int, mixed>|null $params = null ][, array<string|int, mixed>|null $types = null ]) : mixed
This method should be called as close to the DB as possible and after query is finished finalized with stopQuery() method.
Parameters
- $sql : string
- $params : array<string|int, mixed>|null = null
- $types : array<string|int, mixed>|null = null
Tags
stopQuery()
Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to be returned with getQueries() method.
public
stopQuery() : mixed