\OCP\DiagnosticsIQueryLogger

Interface IQueryLogger

Summary

Methods
Constants
startQuery()
stopQuery()
getQueries()
activate()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

startQuery()

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

Mark the start of a query providing query SQL statement, its parameters and types.

This method should be called as close to the DB as possible and after query is finished finalized with stopQuery() method.

Parameters

string $sql
array $params
array $types

stopQuery()

stopQuery() : mixed

Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to be returned with getQueries() method.

Returns

mixed

getQueries()

getQueries() : array<mixed,\OCP\Diagnostics\IQuery>

This method should return all \OCP\Diagnostics\IQuery objects stored using startQuery()/stopQuery() methods.

Returns

array<mixed,\OCP\Diagnostics\IQuery>

activate()

activate() 

Activate the module for the duration of the request. Deactivated module does not create and store \OCP\Diagnostics\IQuery objects.

Only activated module should create and store objects to be returned with getQueries() call.