IQueryLogger

interface OCP\Diagnostics\IQueryLogger
Interface IQueryLogger
Implemented by:OC\Diagnostics\QueryLogger
Source:lib/public/Diagnostics/IQueryLogger.php#36
Parent:Doctrine\DBAL\Logging\SQLLogger

Methods

public OCP\Diagnostics\IQueryLogger::startQuery($sql, $params=null, $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.
Source:

lib/public/Diagnostics/IQueryLogger.php#47

Parameters:
  • $sql (string)
  • $params (array | null)
  • $types (array | null)
Since:

8.0.0

public OCP\Diagnostics\IQueryLogger::stopQuery()
Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to
be returned with getQueries() method.
Source:lib/public/Diagnostics/IQueryLogger.php#56
Returns:mixed
Since:8.0.0
public OCP\Diagnostics\IQueryLogger::getQueries()
This method should return all \OCP\Diagnostics\IQuery objects stored using
startQuery()/stopQuery() methods.
Source:lib/public/Diagnostics/IQueryLogger.php#65
Returns:\OCP\Diagnostics\IQuery[]
Since:8.0.0
public OCP\Diagnostics\IQueryLogger::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.
Source:lib/public/Diagnostics/IQueryLogger.php#75
Since:12.0.0