Nextcloud PHP API (stable18)

IQueryLogger extends SQLLogger

Interface IQueryLogger

Tags
since
8.0.0

Table of Contents

activate()  : mixed
Activate the module for the duration of the request. Deactivated module does not create and store \OCP\Diagnostics\IQuery objects.
getQueries()  : \OCP\Diagnostics\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
since
12.0.0
Return values
mixed

getQueries()

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

public getQueries() : \OCP\Diagnostics\IQuery[]
Tags
since
8.0.0
Return values
\OCP\Diagnostics\IQuery[]

startQuery()

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

public startQuery(string $sql[, array|null $params = null ][, array|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|null = null
$types : array|null = null
Tags
since
8.0.0
Return values
mixed

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
Tags
since
8.0.0
Return values
mixed

Search results