Bitrix API

SqlTrackerQuery implements ArrayAccess

Table of Contents

Interfaces

ArrayAccess

Methods

__construct()  : mixed
addLength()  : void
Adds fetched row size to the query statistic.
addTime()  : void
Increments sql execution time.
finishQuery()  : void
Ends sql timer.
getBinds()  : array<string|int, mixed>|null
Returns sql binds used for query execution.
getFetchedRowsCount()  : int
Returns the number of the fetched rows.
getLength()  : float|int
Returns size of the fetched rows.
getNode()  : string
Returns sql connection node id of the query.
getSelectedFieldsCount()  : int
Returns the fields number.
getSelectedRowsCount()  : int
Returns selected rows count.
getSql()  : string
Returns tracked sql text.
getState()  : string
Returns page state of the query.
getTime()  : float
Returns sql execution time.
getTrace()  : array<string|int, mixed>|null
Returns backtrace of the query.
hasBigFields()  : bool
incrementFetched()  : void
Increments the number of fetched rows.
offsetExists()  : bool
Whether an offset exists.
offsetGet()  : mixed
Offset to retrieve.
offsetSet()  : void
Offset to set.
offsetUnset()  : void
Offset to unset.
refinishQuery()  : void
Finishes query timer one more time.
restartQuery()  : void
Resets sql timer start.
setBinds()  : SqlTrackerQuery
Sets tracked sql binds.
setHasBigFields()  : mixed
setNode()  : SqlTrackerQuery
Sets tracked sql connection node id.
setSelectedFieldsCount()  : void
Sets the fields number in the result.
setSelectedRowsCount()  : void
Sets selected rows count.
setSql()  : SqlTrackerQuery
Sets tracked sql text.
setState()  : SqlTrackerQuery
Sets tracked sql page state.
setTime()  : SqlTrackerQuery
Sets tracked sql execution time.
setTrace()  : SqlTrackerQuery
Sets tracked sql backtrace.
startQuery()  : void
Starts sql timer.

Methods

addLength()

Adds fetched row size to the query statistic.

public addLength(int $length) : void
Parameters
$length : int

addTime()

Increments sql execution time.

public addTime(float $time) : void
Parameters
$time : float

Time in seconds to add.

finishQuery()

Ends sql timer.

public finishQuery([int $skip = 3 ]) : void
Parameters
$skip : int = 3

How many backtrace skip. By default 3.

getBinds()

Returns sql binds used for query execution.

public getBinds() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getFetchedRowsCount()

Returns the number of the fetched rows.

public getFetchedRowsCount() : int
Return values
int

getLength()

Returns size of the fetched rows.

public getLength() : float|int
Return values
float|int

getNode()

Returns sql connection node id of the query.

public getNode() : string
Return values
string

getSelectedFieldsCount()

Returns the fields number.

public getSelectedFieldsCount() : int
Return values
int

getSelectedRowsCount()

Returns selected rows count.

public getSelectedRowsCount() : int
Return values
int

getSql()

Returns tracked sql text.

public getSql() : string
Return values
string

getState()

Returns page state of the query.

public getState() : string
Return values
string

getTime()

Returns sql execution time.

public getTime() : float
Return values
float

getTrace()

Returns backtrace of the query.

public getTrace() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

incrementFetched()

Increments the number of fetched rows.

public incrementFetched() : void

offsetExists()

Whether an offset exists.

public offsetExists(mixed $offset) : bool

Part of ArrayAccess implementation made for backward compatibility.

Parameters
$offset : mixed

Array key.

Return values
bool

offsetGet()

Offset to retrieve.

public offsetGet(mixed $offset) : mixed

Part of ArrayAccess implementation made for backward compatibility.

Parameters
$offset : mixed

Array key.

Attributes
#[ReturnTypeWillChange]

offsetSet()

Offset to set.

public offsetSet(mixed $offset, mixed $value) : void

Part of ArrayAccess implementation made for backward compatibility.

Parameters
$offset : mixed

Array key.

$value : mixed

Array value.

offsetUnset()

Offset to unset.

public offsetUnset(mixed $offset) : void

Part of ArrayAccess implementation made for backward compatibility.

Parameters
$offset : mixed

Array key.

refinishQuery()

Finishes query timer one more time.

public refinishQuery() : void

Use with restartQuery.

Tags
see
SqlTrackerQuery::restartQuery

restartQuery()

Resets sql timer start.

public restartQuery() : void

combined with refinishQuery allows additional time to be included into execution.

Tags
see
SqlTrackerQuery::refinishQuery

setBinds()

Sets tracked sql binds.

public setBinds(array<string|int, mixed> $binds) : SqlTrackerQuery

Returns the object for call chaining.

Parameters
$binds : array<string|int, mixed>

Sql binds.

Return values
SqlTrackerQuery

setHasBigFields()

public setHasBigFields(bool $value) : mixed
Parameters
$value : bool

setSelectedFieldsCount()

Sets the fields number in the result.

public setSelectedFieldsCount(int $count) : void
Parameters
$count : int

setSelectedRowsCount()

Sets selected rows count.

public setSelectedRowsCount(int $count) : void
Parameters
$count : int

setTrace()

Sets tracked sql backtrace.

public setTrace([array<string|int, mixed>|null $trace = null ]) : SqlTrackerQuery

Returns the object for call chaining.

Parameters
$trace : array<string|int, mixed>|null = null

Query backtrace.

Return values
SqlTrackerQuery

startQuery()

Starts sql timer.

public startQuery(string $sql[, array<string|int, mixed>|null $binds = null ]) : void
Parameters
$sql : string

Query text.

$binds : array<string|int, mixed>|null = null

Binded variables used with query.


        
On this page

Search results